diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-06-03 22:33:07 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-06-03 22:33:07 +1200 |
commit | 59e4bf0a8581a168b0f355551244dc45128cba7c (patch) | |
tree | 4a7f0a052165cb645ee907ac46cb7efc998e2f05 | |
parent | 6ef9ed9b15eeb5c1ac2da721475ea0a871268b90 (diff) | |
download | trackermap-server-59e4bf0a8581a168b0f355551244dc45128cba7c.tar.gz trackermap-server-59e4bf0a8581a168b0f355551244dc45128cba7c.tar.bz2 trackermap-server-59e4bf0a8581a168b0f355551244dc45128cba7c.zip |
Fix Xexun2 decoder pattern
-rw-r--r-- | src/org/traccar/protocol/Xexun2ProtocolDecoder.java | 4 | ||||
-rw-r--r-- | test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java | 3 |
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")); } |