diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-03-17 10:03:31 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-03-17 10:03:31 +1300 |
commit | c422898f913eaea260170cf2f4c05e7c932a80ff (patch) | |
tree | 5f69b1c6fe13157ed0bd54be793da1e28b880d25 /src/org | |
parent | 271263e6feb2b78f7f23a04cb1cbca86eb8c4c64 (diff) | |
download | traccar-server-c422898f913eaea260170cf2f4c05e7c932a80ff.tar.gz traccar-server-c422898f913eaea260170cf2f4c05e7c932a80ff.tar.bz2 traccar-server-c422898f913eaea260170cf2f4c05e7c932a80ff.zip |
Fix GPS103 protocol OBD decoding
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/Gps103ProtocolDecoder.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java index e2aed6309..ce5a54141 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -87,11 +87,13 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { .number("(d+),") // odometer .number("(d+.d+)?,") // fuel instant .number("(?:d+.d+)?,") // fuel average + .number("(d+),") // hours .number("(d+),") // speed - .number("d+,") // power load - .number("(d+.d+%),") // throttle + .number("d+.?d*%,") // power load + .number("(d+),") // temperature + .number("(d+.?d*%),") // throttle .number("(d+),") // rpm - .number("(d+.d+%),") // battery + .number("(d+.d+),") // battery .number("[^,]*,") // dtc 1 .number("[^,]*,") // dtc 2 .number("[^,]*,") // dtc 3 @@ -166,7 +168,9 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { position.set(Event.KEY_ODOMETER, parser.nextInt()); position.set(Event.KEY_FUEL, parser.next()); + position.set(Event.KEY_HOURS, parser.next()); position.set(Event.KEY_OBD_SPEED, parser.next()); + position.set(Event.PREFIX_TEMP + 1, parser.next()); position.set(Event.KEY_THROTTLE, parser.next()); position.set(Event.KEY_RPM, parser.next()); position.set(Event.KEY_BATTERY, parser.next()); |