diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-04 05:35:12 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-04 13:35:56 +1300 |
commit | 8f7ed4ed8ab881c480c22f605d1ff14918a3e43f (patch) | |
tree | 8c4d6cadfae72c98c3eeea7cfdfde472da291af5 /src/org/traccar/protocol/Gps103ProtocolDecoder.java | |
parent | da251c52ba6a001e85574f688455a698a6998855 (diff) | |
download | trackermap-server-8f7ed4ed8ab881c480c22f605d1ff14918a3e43f.tar.gz trackermap-server-8f7ed4ed8ab881c480c22f605d1ff14918a3e43f.tar.bz2 trackermap-server-8f7ed4ed8ab881c480c22f605d1ff14918a3e43f.zip |
Decode GPS103 DTCs (fix #2401)
Diffstat (limited to 'src/org/traccar/protocol/Gps103ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Gps103ProtocolDecoder.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java index 363834f89..ed50c33f0 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -95,10 +95,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { .number("(d+.?d*%),") // throttle .number("(d+),") // rpm .number("(d+.d+),") // battery - .number("[^,]*,") // dtc 1 - .number("[^,]*,") // dtc 2 - .number("[^,]*,") // dtc 3 - .number("[^,]*") // dtc 4 + .number("([^;]*)") // dtcs .any() .compile(); @@ -197,6 +194,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_THROTTLE, parser.next()); position.set(Position.KEY_RPM, parser.next()); position.set(Position.KEY_BATTERY, parser.next()); + position.set(Position.KEY_DTCS, parser.next().replace(',', ' ').trim()); return position; |