aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-03-29 13:31:39 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-03-29 13:31:39 +1300
commitdfb124c2fd1ecebcdc474e26e01fa7949be69b8c (patch)
treec08ebf6ec2bea1c19cb7846be113a1eaba5150bb /src/org/traccar/protocol
parent0728eec78c7c2826d78879481852688b6859fff6 (diff)
downloadtrackermap-server-dfb124c2fd1ecebcdc474e26e01fa7949be69b8c.tar.gz
trackermap-server-dfb124c2fd1ecebcdc474e26e01fa7949be69b8c.tar.bz2
trackermap-server-dfb124c2fd1ecebcdc474e26e01fa7949be69b8c.zip
Improve Wondex decoder
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/WondexProtocolDecoder.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/WondexProtocolDecoder.java b/src/org/traccar/protocol/WondexProtocolDecoder.java
index 90f2e62e9..766bbdbcc 100644
--- a/src/org/traccar/protocol/WondexProtocolDecoder.java
+++ b/src/org/traccar/protocol/WondexProtocolDecoder.java
@@ -45,6 +45,7 @@ public class WondexProtocolDecoder extends BaseProtocolDecoder {
"(-?\\d+)," + // Altitude
"(\\d+)," + // Satellites
"(\\d+),?" + // Event
+ "(?:(\\d+\\.\\d+)V,)?" + // Battery
"(\\d+\\.\\d+)?,?" + // Milage
"(\\d+)?,?" + // Input
"(\\d+\\.\\d+)?,?" + // ADC1
@@ -102,6 +103,9 @@ public class WondexProtocolDecoder extends BaseProtocolDecoder {
// Event
extendedInfo.set("event", parser.group(index++));
+ // Battery
+ extendedInfo.set("battery", parser.group(index++));
+
// Milage
extendedInfo.set("milage", parser.group(index++));