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