diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-05-30 19:34:50 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-05-30 19:34:50 +1200 |
commit | 4d46aa335ad0f1985bf42d6a68904e2c594a50cf (patch) | |
tree | 96ec01d04abeb6398b1015b53379eb5a0eef5fc0 | |
parent | 47f7837e086b3d664ea0ad0f45b2d1d35e5ba301 (diff) | |
download | trackermap-server-4d46aa335ad0f1985bf42d6a68904e2c594a50cf.tar.gz trackermap-server-4d46aa335ad0f1985bf42d6a68904e2c594a50cf.tar.bz2 trackermap-server-4d46aa335ad0f1985bf42d6a68904e2c594a50cf.zip |
Fix Wondex decoder (fix #730)
-rw-r--r-- | src/org/traccar/protocol/WondexProtocolDecoder.java | 4 | ||||
-rw-r--r-- | test/org/traccar/protocol/WondexProtocolDecoderTest.java | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/WondexProtocolDecoder.java b/src/org/traccar/protocol/WondexProtocolDecoder.java index 3ac3eef6b..a9c4ea4c1 100644 --- a/src/org/traccar/protocol/WondexProtocolDecoder.java +++ b/src/org/traccar/protocol/WondexProtocolDecoder.java @@ -42,7 +42,7 @@ public class WondexProtocolDecoder extends BaseProtocolDecoder { "(-?\\d+\\.\\d+)," + // Latitude "(\\d+)," + // Speed "(\\d+)," + // Course - "(-?\\d+)," + // Altitude + "(-?\\d+\\.?\\d*)," + // Altitude "(\\d+)," + // Satellites "(\\d+),?" + // Event "(?:(\\d+\\.\\d+)V,)?" + // Battery @@ -50,7 +50,7 @@ public class WondexProtocolDecoder extends BaseProtocolDecoder { "(\\d+)?,?" + // Input "(\\d+\\.\\d+)?,?" + // ADC1 "(\\d+\\.\\d+)?,?" + // ADC2 - "(\\d+)?"); // Output + "(\\d+)?.*"); // Output @Override protected Object decode( diff --git a/test/org/traccar/protocol/WondexProtocolDecoderTest.java b/test/org/traccar/protocol/WondexProtocolDecoderTest.java index 88e1572fd..eadd1d357 100644 --- a/test/org/traccar/protocol/WondexProtocolDecoderTest.java +++ b/test/org/traccar/protocol/WondexProtocolDecoderTest.java @@ -29,6 +29,9 @@ public class WondexProtocolDecoderTest { verify(decoder.decode(null, null, "3997324533,20140326074908,28.797603,47.041635,0,48,0,6,2,3.90V,0")); + + verify(decoder.decode(null, null, + "2000000001,20140529213210,-63.179111,9.781493,0,0,54.0,8,2,0.0,0,0.01,0.01,0,0,0,0")); } |