diff options
author | Matjaž Črnko <m.crnko@txt.si> | 2023-06-11 11:43:10 +0200 |
---|---|---|
committer | Matjaž Črnko <m.crnko@txt.si> | 2023-06-11 11:43:10 +0200 |
commit | ea1e72277a264d69c2e4b9b15113dffcb6b7d662 (patch) | |
tree | 1b227af58739fd23182b34cbee4de13e52caff58 /src/main | |
parent | 13544022b3bf855fdc63893aa3040ecc78fb4dbb (diff) | |
download | trackermap-server-ea1e72277a264d69c2e4b9b15113dffcb6b7d662.tar.gz trackermap-server-ea1e72277a264d69c2e4b9b15113dffcb6b7d662.tar.bz2 trackermap-server-ea1e72277a264d69c2e4b9b15113dffcb6b7d662.zip |
Ruptela IO Decoding for Device Temperature, Battery charging, Tow Alarm, Accident Alarm
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java index 8672d104a..c9efd8f7b 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 32: + position.set(Position.KEY_DEVICE_TEMP, readValue(buf, length, true)); + break; case 65: position.set(Position.KEY_ODOMETER, readValue(buf, length, true)); break; @@ -132,9 +135,22 @@ 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; |