aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java21
m---------traccar-web0
2 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;
diff --git a/traccar-web b/traccar-web
-Subproject 877108d9012301f2b149ae862af4cffe17dfb20
+Subproject cb7106f4bfd6856470861890ea5e4c0bbc4703a