aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2023-06-11 08:32:29 -0700
committerGitHub <noreply@github.com>2023-06-11 08:32:29 -0700
commite88a5c9086ed960da1b593c38d313d004d58da5b (patch)
treec565019e59e259518df1afdbf4e38ab7369efb54 /src
parent7f2ded68ef015684f90bef59c055a1c980688069 (diff)
parentea1e72277a264d69c2e4b9b15113dffcb6b7d662 (diff)
downloadtrackermap-server-e88a5c9086ed960da1b593c38d313d004d58da5b.tar.gz
trackermap-server-e88a5c9086ed960da1b593c38d313d004d58da5b.tar.bz2
trackermap-server-e88a5c9086ed960da1b593c38d313d004d58da5b.zip
Merge pull request #5113 from jinzo/ruptela-improvements
Ruptela IO decoding for Odometer, OBD Odometer and OBD Speed
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
index 77df0deb7..c9efd8f7b 100644
--- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
@@ -108,6 +108,12 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
case 30:
position.set(Position.KEY_BATTERY, readValue(buf, length, false) * 0.001);
break;
+ case 32:
+ position.set(Position.KEY_DEVICE_TEMP, readValue(buf, length, true));
+ break;
+ case 65:
+ position.set(Position.KEY_ODOMETER, readValue(buf, length, true));
+ break;
case 74:
position.set(Position.PREFIX_TEMP + 3, readValue(buf, length, true) * 0.1);
break;
@@ -116,6 +122,9 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
case 80:
position.set(Position.PREFIX_TEMP + (id - 78), readValue(buf, length, true) * 0.1);
break;
+ case 95:
+ position.set(Position.KEY_OBD_SPEED, UnitsConverter.knotsFromKph(readValue(buf, length, true)));
+ break;
case 134:
if (readValue(buf, length, false) > 0) {
position.set(Position.KEY_ALARM, Position.ALARM_BRAKING);
@@ -126,9 +135,25 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_ALARM, Position.ALARM_ACCELERATION);
}
break;
+ case 170:
+ position.set(Position.KEY_CHARGE, readValue(buf, length, false) > 0);
+ break;
case 197:
position.set(Position.KEY_RPM, readValue(buf, length, false) * 0.125);
break;
+ case 410:
+ if (readValue(buf, length, false) > 0) {
+ position.set(Position.KEY_ALARM, Position.ALARM_TOW);
+ }
+ break;
+ case 411:
+ if (readValue(buf, length, false) > 0) {
+ position.set(Position.KEY_ALARM, Position.ALARM_ACCIDENT);
+ }
+ break;
+ case 645:
+ position.set(Position.KEY_OBD_ODOMETER, readValue(buf, length, true) * 1000);
+ break;
default:
position.set(Position.PREFIX_IO + id, readValue(buf, length, false));
break;