From 38249673287b908c0ca55847a35ca16a7b6a0c50 Mon Sep 17 00:00:00 2001 From: jon-stumpf Date: Sun, 19 Feb 2017 11:45:13 -0500 Subject: Updated TmpProtocolDecoder to record KEY_SATELLITES_VISIBLE, KEY_RSSI, and "operator"; --- src/org/traccar/protocol/TmgProtocolDecoder.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/TmgProtocolDecoder.java b/src/org/traccar/protocol/TmgProtocolDecoder.java index 2f2dddf60..9fa8759a0 100644 --- a/src/org/traccar/protocol/TmgProtocolDecoder.java +++ b/src/org/traccar/protocol/TmgProtocolDecoder.java @@ -50,9 +50,9 @@ 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("(d+),") // visible satellites + .number("([^,]*),") // operator + .number("(d+),") // rssi .number("x+,") // cid .expression("([01]),") // ignition .number("(d+.?d*),") // battery @@ -95,6 +95,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()); -- cgit v1.2.3