aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/Xexun2ProtocolDecoder.java4
-rw-r--r--test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Xexun2ProtocolDecoder.java b/src/org/traccar/protocol/Xexun2ProtocolDecoder.java
index 6e040d2bc..d974ce227 100644
--- a/src/org/traccar/protocol/Xexun2ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Xexun2ProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2013 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2012 - 2014 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ public class Xexun2ProtocolDecoder extends BaseProtocolDecoder {
static private Pattern pattern = Pattern.compile(
"[\r\n]*" +
"(\\d+)," + // Serial
- "(\\+?\\d+)?," + // Number
+ "([^,]+)?," + // Number
"GPRMC," +
"(\\d{2})(\\d{2})(\\d{2})\\.(\\d+)," + // Time (HHMMSS.SSS)
"([AV])," + // Validity
diff --git a/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java b/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java
index 089f2da76..c3a257318 100644
--- a/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java
@@ -38,6 +38,9 @@ public class Xexun2ProtocolDecoderTest {
verify(decoder.decode(null, null,
"130725134142,,GPRMC,134142.591,A,3845.6283,N,00909.8876,W,2.08,287.33,250713,,,A*71,F,, imei:013227000526784,03,-50.7,L:3.69V,0,128,65337,268,03,177A,119F"));
+
+ verify(decoder.decode(null, null,
+ "140602152533,TESCO_INFO,GPRMC,152533.000,A,5145.4275,N,00000.3448,E,0.00,0.00,020614,,,A*66,F,, imei:013227002781643,06,35.1,F:4.15V,1,135,38950,234,10,10B4,5235"));
}