From 105e4b943e618d6fa8200d25225caeb4680c2080 Mon Sep 17 00:00:00 2001 From: Matjaž Črnko Date: Mon, 12 Jun 2023 16:49:33 +0200 Subject: Ruptela - saner ignition decoding --- src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/org/traccar/protocol') diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java index c9efd8f7b..85f0d407a 100644 --- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java @@ -99,9 +99,6 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { case 4: position.set("di" + (id - 1), readValue(buf, length, false)); break; - case 5: - position.set(Position.KEY_IGNITION, readValue(buf, length, false) == 1); - break; case 29: position.set(Position.KEY_POWER, readValue(buf, length, false)); break; @@ -141,6 +138,10 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { case 197: position.set(Position.KEY_RPM, readValue(buf, length, false) * 0.125); break; + case 251: + case 409: + position.set(Position.KEY_IGNITION, readValue(buf, length, false) == 1); + break; case 410: if (readValue(buf, length, false) > 0) { position.set(Position.KEY_ALARM, Position.ALARM_TOW); -- cgit v1.2.3 From 398128c7c3f7de283e9d35e74d96e4990381ef1b Mon Sep 17 00:00:00 2001 From: Matjaž Črnko Date: Mon, 12 Jun 2023 17:10:01 +0200 Subject: Ruptela - motion, gps antenna alarm and inputs decoding improvements --- .../traccar/protocol/RuptelaProtocolDecoder.java | 21 +++++++++++++++++++++ traccar-web | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'src/main/java/org/traccar/protocol') 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 index 877108d90..cb7106f4b 160000 --- a/traccar-web +++ b/traccar-web @@ -1 +1 @@ -Subproject commit 877108d9012301f2b149ae862af4cffe17dfb20d +Subproject commit cb7106f4bfd6856470861890ea5e4c0bbc4703ac -- cgit v1.2.3 From 5ac55028cb315acec7e8f966c5ab11bdcc2c81bb Mon Sep 17 00:00:00 2001 From: Matjaž Črnko Date: Mon, 12 Jun 2023 17:26:38 +0200 Subject: Ruptela - Tampering, Jamming and Network Operator decoding. --- .../java/org/traccar/protocol/RuptelaProtocolDecoder.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/main/java/org/traccar/protocol') diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java index 5fd7b755e..2a552a874 100644 --- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java @@ -132,6 +132,11 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { case 80: position.set(Position.PREFIX_TEMP + (id - 78), readValue(buf, length, true) * 0.1); break; + case 88: + if (readValue(buf, length, false) == 1) { + position.set(Position.KEY_ALARM, Position.ALARM_JAMMING); + } + break; case 95: position.set(Position.KEY_OBD_SPEED, UnitsConverter.knotsFromKph(readValue(buf, length, true))); break; @@ -145,6 +150,9 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_ALARM, Position.ALARM_ACCELERATION); } break; + case 150: + position.set(Position.KEY_OPERATOR, readValue(buf, length, false)); + break; case 170: position.set(Position.KEY_CHARGE, readValue(buf, length, false) > 0); break; @@ -176,6 +184,11 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { case 645: position.set(Position.KEY_OBD_ODOMETER, readValue(buf, length, true) * 1000); break; + case 758: + if (readValue(buf, length, false) == 1) { + position.set(Position.KEY_ALARM, Position.ALARM_TAMPERING); + } + break; default: position.set(Position.PREFIX_IO + id, readValue(buf, length, false)); break; -- cgit v1.2.3 From acbb3b36fab3f03682f454c3a64a1a5c5bef4fd5 Mon Sep 17 00:00:00 2001 From: Matjaž Črnko Date: Mon, 12 Jun 2023 18:15:28 +0200 Subject: Ruptela - use > 0 for boolean comparison --- src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/org/traccar/protocol') diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java index 2a552a874..d86476f9a 100644 --- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java @@ -157,14 +157,14 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_CHARGE, readValue(buf, length, false) > 0); break; case 173: - position.set(Position.KEY_MOTION, readValue(buf, length, false) == 1); + position.set(Position.KEY_MOTION, readValue(buf, length, false) > 0); break; case 197: position.set(Position.KEY_RPM, readValue(buf, length, false) * 0.125); break; case 251: case 409: - position.set(Position.KEY_IGNITION, readValue(buf, length, false) == 1); + position.set(Position.KEY_IGNITION, readValue(buf, length, false) > 0); break; case 410: if (readValue(buf, length, false) > 0) { -- cgit v1.2.3 From d6bc465b25f4be9c15342395c12fa73198da0842 Mon Sep 17 00:00:00 2001 From: Matjaž Črnko Date: Mon, 12 Jun 2023 19:33:56 +0200 Subject: Ruptela - correctly decode the input prefixes --- src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/org/traccar/protocol') diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java index d86476f9a..c1fc95e34 100644 --- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java @@ -98,19 +98,19 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { case 3: case 4: case 5: - position.set("di" + (id - 1), readValue(buf, length, false)); + position.set(Position.PREFIX_IN + (id - 1), readValue(buf, length, false)); break; case 20: - position.set("ai3", readValue(buf, length, false)); + position.set(Position.PREFIX_ADC + 3, readValue(buf, length, false)); break; case 21: - position.set("ai4", readValue(buf, length, false)); + position.set(Position.PREFIX_ADC + 4, readValue(buf, length, false)); break; case 22: - position.set("ai1", readValue(buf, length, false)); + position.set(Position.PREFIX_ADC + 1, readValue(buf, length, false)); break; case 23: - position.set("ai2", readValue(buf, length, false)); + position.set(Position.PREFIX_ADC + 2, readValue(buf, length, false)); break; case 29: position.set(Position.KEY_POWER, readValue(buf, length, false)); -- cgit v1.2.3 From 39ae0f3b25ba198c74a022bae059c45c4d0ac985 Mon Sep 17 00:00:00 2001 From: Matjaž Črnko Date: Mon, 12 Jun 2023 20:38:40 +0200 Subject: Ruptela - > 0 for boolean on the Jamming boolean --- src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/org/traccar/protocol') diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java index c1fc95e34..33372224b 100644 --- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java @@ -133,7 +133,7 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { position.set(Position.PREFIX_TEMP + (id - 78), readValue(buf, length, true) * 0.1); break; case 88: - if (readValue(buf, length, false) == 1) { + if (readValue(buf, length, false) > 0) { position.set(Position.KEY_ALARM, Position.ALARM_JAMMING); } break; -- cgit v1.2.3 From f40a3307d7b77fd007572ee80ba3f0a0dd05cb51 Mon Sep 17 00:00:00 2001 From: Matjaž Črnko Date: Mon, 12 Jun 2023 22:22:50 +0200 Subject: Ruptela - only use GPS Antenna Cut Alarm when we know for sure that it's disconnected. --- src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/org/traccar/protocol') diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java index 33372224b..737d30f10 100644 --- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java @@ -177,7 +177,7 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { } break; case 415: - if (readValue(buf, length, false) != 1) { + if (readValue(buf, length, false) == 0) { position.set(Position.KEY_ALARM, Position.ALARM_GPS_ANTENNA_CUT); } break; -- cgit v1.2.3