diff options
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/ItsProtocolDecoder.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/ItsProtocolDecoder.java b/src/main/java/org/traccar/protocol/ItsProtocolDecoder.java index f66669a98..94c9a3038 100644 --- a/src/main/java/org/traccar/protocol/ItsProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/ItsProtocolDecoder.java @@ -90,6 +90,10 @@ public class ItsProtocolDecoder extends BaseProtocolDecoder { .number("(-?d+),") // tilt x .or() .number("d+,") // index + .number("(d+.?d*),") // odometer + .number("x+,") // checksum + .or() + .number("d+,") // index .number("(d+.?d*),") // adc1 .number("(d+.?d*),") // adc2 .groupEnd("?") @@ -244,6 +248,10 @@ public class ItsProtocolDecoder extends BaseProtocolDecoder { position.set("tiltX", parser.nextInt()); } + if (parser.hasNext()) { + position.set(Position.KEY_ODOMETER, parser.nextDouble() * 1000); + } + if (parser.hasNext(2)) { position.set(Position.PREFIX_ADC + 1, parser.nextDouble()); position.set(Position.PREFIX_ADC + 2, parser.nextDouble()); |