aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhallmark9 <spamsink05@yahoo.com>2012-12-23 21:48:53 -0500
committerhallmark9 <spamsink05@yahoo.com>2012-12-23 21:48:53 -0500
commitfbb0d0d594bd423ad102c2b5a38526b928918fb9 (patch)
tree52a54b23bed698bd71778cf0c79244306538c274
parentaaa43d4e6c99a9683a0b817a6b1bf461134d2391 (diff)
downloadtrackermap-server-fbb0d0d594bd423ad102c2b5a38526b928918fb9.tar.gz
trackermap-server-fbb0d0d594bd423ad102c2b5a38526b928918fb9.tar.bz2
trackermap-server-fbb0d0d594bd423ad102c2b5a38526b928918fb9.zip
Tolerate Xexun2 data with low power level.
-rw-r--r--src/org/traccar/protocol/Xexun2ProtocolDecoder.java2
-rw-r--r--test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Xexun2ProtocolDecoder.java b/src/org/traccar/protocol/Xexun2ProtocolDecoder.java
index 6edb3733e..39a5f76c0 100644
--- a/src/org/traccar/protocol/Xexun2ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Xexun2ProtocolDecoder.java
@@ -62,7 +62,7 @@ public class Xexun2ProtocolDecoder extends GenericProtocolDecoder {
"(\\d+)," + // IMEI
"(\\d+)," + // Satellites
"(\\d+\\.\\d+)," + // Altitude
- "F:(\\d+\\.\\d+)V," + // Power
+ "[FL]:(\\d+\\.\\d+)V," + // Power
".*" +
"[\r\n]*");
diff --git a/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java b/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java
index 8a31334da..a8247b8ba 100644
--- a/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java
@@ -16,6 +16,9 @@ public class Xexun2ProtocolDecoderTest {
assertNotNull(decoder.decode(null, null,
"111111120009,+436763737552,GPRMC,120600.000,A,6000.0000,N,13000.0000,E,0.00,0.00,010112,,,A*68,F,help me!, imei:123456789012345,04,481.2,F:4.15V,0,139,2689,232,03,2725,0576"));
+ assertNotNull(decoder.decode(null, null,
+ "111111120009,+436763737552,GPRMC,120600.000,A,6000.0000,N,13000.0000,E,0.00,0.00,010112,,,A*68,F,help me!, imei:123456789012345,04,481.2,L:3.5V,0,139,2689,232,03,2725,0576"));
+
}
}