aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2017-02-19 11:45:13 -0500
committerjon-stumpf <jon.stumpf@gmail.com>2017-02-19 11:45:13 -0500
commit38249673287b908c0ca55847a35ca16a7b6a0c50 (patch)
tree01c65d75a72cd5996b1b4790fe6438c83813d46a /src/org/traccar
parenta709867c15dc3752af487ac1c053d4ee982bc8cd (diff)
downloadtraccar-server-38249673287b908c0ca55847a35ca16a7b6a0c50.tar.gz
traccar-server-38249673287b908c0ca55847a35ca16a7b6a0c50.tar.bz2
traccar-server-38249673287b908c0ca55847a35ca16a7b6a0c50.zip
Updated TmpProtocolDecoder to record KEY_SATELLITES_VISIBLE, KEY_RSSI, and "operator";
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/TmgProtocolDecoder.java9
1 files changed, 6 insertions, 3 deletions
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());