aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorMatjaž Črnko <m.crnko@txt.si>2023-06-11 11:05:46 +0200
committerMatjaž Črnko <m.crnko@txt.si>2023-06-11 11:05:46 +0200
commit13544022b3bf855fdc63893aa3040ecc78fb4dbb (patch)
tree0a7da6ce21aae0cb763e6f4676f69a6ab7142d3a /src/main
parent62ff6c8464dbdd8eb07e8347b356b8739b8c9008 (diff)
downloadtrackermap-server-13544022b3bf855fdc63893aa3040ecc78fb4dbb.tar.gz
trackermap-server-13544022b3bf855fdc63893aa3040ecc78fb4dbb.tar.bz2
trackermap-server-13544022b3bf855fdc63893aa3040ecc78fb4dbb.zip
Ruptela IO decoding for Odometer, OBD Odometer and OBD Speed
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java9
1 files changed, 9 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..8672d104a 100644
--- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
@@ -108,6 +108,9 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
case 30:
position.set(Position.KEY_BATTERY, readValue(buf, length, false) * 0.001);
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 +119,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);
@@ -129,6 +135,9 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
case 197:
position.set(Position.KEY_RPM, readValue(buf, length, false) * 0.125);
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;