diff options
Diffstat (limited to 'src/org/traccar/protocol/TmgProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/TmgProtocolDecoder.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/TmgProtocolDecoder.java b/src/org/traccar/protocol/TmgProtocolDecoder.java index beb2b0b78..3b73a1516 100644 --- a/src/org/traccar/protocol/TmgProtocolDecoder.java +++ b/src/org/traccar/protocol/TmgProtocolDecoder.java @@ -50,10 +50,10 @@ public class TmgProtocolDecoder extends BaseProtocolDecoder { .number("(-?d+.?d*),") // altitude .number("(d+.d+),") // hdop .number("(d+),") // satellites - .number("d+,") // visible satellites - .number("[^,]*,") // operator - .number("d+,") // rssi - .number("[^,]*,") // cid + .number("(d+),") // visible satellites + .number("([^,]*),") // operator + .number("(d+),") // rssi + .number("[^,]*,") // cid .expression("([01]),") // ignition .number("(d+.?d*),") // battery .number("(d+.?d*),") // power @@ -122,6 +122,9 @@ public class TmgProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_HDOP, parser.nextDouble()); position.set(Position.KEY_SATELLITES, parser.nextInt()); + position.set(Position.KEY_SATELLITES_VISIBLE, parser.nextInt()); + position.set("operator", parser.next()); + position.set(Position.KEY_RSSI, parser.nextInt()); position.set(Position.KEY_IGNITION, parser.nextInt() == 1); position.set(Position.KEY_BATTERY, parser.nextDouble()); position.set(Position.KEY_POWER, parser.nextDouble()); |