diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-02-21 21:32:31 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-21 21:32:31 +1300 |
commit | 6838a1264922e656da2ed8b4ce390fa17e039571 (patch) | |
tree | 0a66e360c6d3b13f24c60e5300985ce121a6b25c /src/org/traccar/protocol/TmgProtocolDecoder.java | |
parent | 6ad0ee71f38feb1f4c57c0b22815038a0273e4c5 (diff) | |
parent | 888c392af40187f3a0ecc3395495db9acd85b827 (diff) | |
download | trackermap-server-6838a1264922e656da2ed8b4ce390fa17e039571.tar.gz trackermap-server-6838a1264922e656da2ed8b4ce390fa17e039571.tar.bz2 trackermap-server-6838a1264922e656da2ed8b4ce390fa17e039571.zip |
Merge pull request #2906 from jon-stumpf/jss-minifinder
MiniFinder Updates
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()); |