aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-01-20 10:20:51 -0800
committerAnton Tananaev <anton@traccar.org>2024-01-20 10:20:51 -0800
commit7374a69f188918cbd247047fcb5fe09dabffa400 (patch)
treeca17e5a3953ba7d2d8752e03b9a9c0cc5ce7cfbd /src/main/java/org
parent77a2b4f5e587f648502f3a72e525b7c960e58c80 (diff)
downloadtrackermap-server-7374a69f188918cbd247047fcb5fe09dabffa400.tar.gz
trackermap-server-7374a69f188918cbd247047fcb5fe09dabffa400.tar.bz2
trackermap-server-7374a69f188918cbd247047fcb5fe09dabffa400.zip
Ruptela FM Pro4 attributes
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java42
1 files changed, 37 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
index cde626c5f..55b3c900f 100644
--- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 - 2022 Anton Tananaev (anton@traccar.org)
+ * Copyright 2013 - 2024 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -112,6 +112,10 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
case 5:
position.set(Position.PREFIX_IN + (id - 1), readValue(buf, length, false));
break;
+ case 13:
+ case 173:
+ position.set(Position.KEY_MOTION, readValue(buf, length, false) > 0);
+ break;
case 20:
position.set(Position.PREFIX_ADC + 3, readValue(buf, length, false));
break;
@@ -133,6 +137,9 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
case 32:
position.set(Position.KEY_DEVICE_TEMP, readValue(buf, length, true));
break;
+ case 39:
+ position.set(Position.KEY_ENGINE_LOAD, readValue(buf, length, true));
+ break;
case 65:
position.set(Position.KEY_ODOMETER, readValue(buf, length, true));
break;
@@ -149,9 +156,18 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_ALARM, Position.ALARM_JAMMING);
}
break;
+ case 94:
+ position.set(Position.KEY_RPM, readValue(buf, length, true) * 0.25);
+ break;
case 95:
position.set(Position.KEY_OBD_SPEED, readValue(buf, length, true));
break;
+ case 98:
+ position.set("fuelRate", readValue(buf, length, true) * 100 / 255.0);
+ break;
+ case 100:
+ position.set(Position.KEY_FUEL_CONSUMPTION, readValue(buf, length, true) / 20.0);
+ break;
case 134:
if (readValue(buf, length, false) > 0) {
position.set(Position.KEY_ALARM, Position.ALARM_BRAKING);
@@ -165,15 +181,31 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
case 150:
position.set(Position.KEY_OPERATOR, readValue(buf, length, false));
break;
- case 170:
- position.set(Position.KEY_CHARGE, readValue(buf, length, false) > 0);
+ case 163:
+ position.set(Position.KEY_ODOMETER, readValue(buf, length, false) * 5);
break;
- case 173:
- position.set(Position.KEY_MOTION, readValue(buf, length, false) > 0);
+ case 164:
+ position.set(Position.KEY_ODOMETER_TRIP, readValue(buf, length, false) * 5);
+ break;
+ case 165:
+ position.set(Position.KEY_OBD_SPEED, readValue(buf, length, false) / 256.0);
break;
+ case 166:
case 197:
position.set(Position.KEY_RPM, readValue(buf, length, false) * 0.125);
break;
+ case 170:
+ position.set(Position.KEY_CHARGE, readValue(buf, length, false) > 0);
+ break;
+ case 205:
+ position.set(Position.KEY_FUEL_LEVEL, readValue(buf, length, false));
+ break;
+ case 207:
+ position.set(Position.KEY_FUEL_LEVEL, readValue(buf, length, false) * 0.4);
+ break;
+ case 208:
+ position.set(Position.KEY_FUEL_USED, readValue(buf, length, false) * 0.5);
+ break;
case 251:
case 409:
position.set(Position.KEY_IGNITION, readValue(buf, length, false) > 0);