diff options
-rw-r--r-- | src/org/traccar/protocol/WondexProtocolDecoder.java | 4 | ||||
-rw-r--r-- | test/org/traccar/protocol/WondexProtocolDecoderTest.java | 3 |
2 files changed, 7 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++)); diff --git a/test/org/traccar/protocol/WondexProtocolDecoderTest.java b/test/org/traccar/protocol/WondexProtocolDecoderTest.java index bf51be534..88e1572fd 100644 --- a/test/org/traccar/protocol/WondexProtocolDecoderTest.java +++ b/test/org/traccar/protocol/WondexProtocolDecoderTest.java @@ -26,6 +26,9 @@ public class WondexProtocolDecoderTest { verify(decoder.decode(null, null, "1044989601,20130322172647,13.572583,52.401070,22,204,-49,0,2")); + + verify(decoder.decode(null, null, + "3997324533,20140326074908,28.797603,47.041635,0,48,0,6,2,3.90V,0")); } |