aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorMatjaž Črnko <m.crnko@txt.si>2023-06-12 17:10:01 +0200
committerMatjaž Črnko <m.crnko@txt.si>2023-06-12 17:10:01 +0200
commit398128c7c3f7de283e9d35e74d96e4990381ef1b (patch)
tree198ccac4642dc25b2080208c8b9612de200a1175 /src/main/java
parent105e4b943e618d6fa8200d25225caeb4680c2080 (diff)
downloadtrackermap-server-398128c7c3f7de283e9d35e74d96e4990381ef1b.tar.gz
trackermap-server-398128c7c3f7de283e9d35e74d96e4990381ef1b.tar.bz2
trackermap-server-398128c7c3f7de283e9d35e74d96e4990381ef1b.zip
Ruptela - motion, gps antenna alarm and inputs decoding improvements
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
index 85f0d407a..5fd7b755e 100644
--- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
@@ -97,8 +97,21 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
case 2:
case 3:
case 4:
+ case 5:
position.set("di" + (id - 1), readValue(buf, length, false));
break;
+ case 20:
+ position.set("ai3", readValue(buf, length, false));
+ break;
+ case 21:
+ position.set("ai4", readValue(buf, length, false));
+ break;
+ case 22:
+ position.set("ai1", readValue(buf, length, false));
+ break;
+ case 23:
+ position.set("ai2", readValue(buf, length, false));
+ break;
case 29:
position.set(Position.KEY_POWER, readValue(buf, length, false));
break;
@@ -135,6 +148,9 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
case 170:
position.set(Position.KEY_CHARGE, readValue(buf, length, false) > 0);
break;
+ case 173:
+ position.set(Position.KEY_MOTION, readValue(buf, length, false) == 1);
+ break;
case 197:
position.set(Position.KEY_RPM, readValue(buf, length, false) * 0.125);
break;
@@ -152,6 +168,11 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_ALARM, Position.ALARM_ACCIDENT);
}
break;
+ case 415:
+ if (readValue(buf, length, false) != 1) {
+ position.set(Position.KEY_ALARM, Position.ALARM_GPS_ANTENNA_CUT);
+ }
+ break;
case 645:
position.set(Position.KEY_OBD_ODOMETER, readValue(buf, length, true) * 1000);
break;