diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-03-13 20:34:11 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-03-13 20:34:11 +1300 |
commit | 7c8a732d577d6748b9223f720d2dde70f5ebfc41 (patch) | |
tree | 54ae40d804b8d214531bf53b9c8dcaf78dd2a194 | |
parent | a353cbf806f21767f6a173255141dd7db8314fe8 (diff) | |
download | trackermap-server-7c8a732d577d6748b9223f720d2dde70f5ebfc41.tar.gz trackermap-server-7c8a732d577d6748b9223f720d2dde70f5ebfc41.tar.bz2 trackermap-server-7c8a732d577d6748b9223f720d2dde70f5ebfc41.zip |
Fix T55 regular expression
-rw-r--r-- | src/org/traccar/protocol/T55ProtocolDecoder.java | 16 | ||||
-rw-r--r-- | test/org/traccar/protocol/T55ProtocolDecoderTest.java | 3 |
2 files changed, 5 insertions, 14 deletions
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java index 57810be3b..b95b9fc5a 100644 --- a/src/org/traccar/protocol/T55ProtocolDecoder.java +++ b/src/org/traccar/protocol/T55ProtocolDecoder.java @@ -26,19 +26,10 @@ import org.traccar.ServerManager; import org.traccar.helper.Log; import org.traccar.model.Position; -/** - * T55 tracker protocol decoder - */ public class T55ProtocolDecoder extends BaseProtocolDecoder { - /** - * Device ID - */ private Long deviceId; - /** - * Initialize - */ public T55ProtocolDecoder(ServerManager serverManager) { super(serverManager); } @@ -54,14 +45,11 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder { "([NS])," + "(\\d{3})(\\d{2}\\.\\d+)," + // Longitude (DDDMM.MMMM) "([EW])," + - "(\\d+\\.\\d{2})?," + // Speed - "(\\d+\\.\\d{2})?," + // Course + "(\\d+\\.?\\d*)?," + // Speed + "(\\d+\\.?\\d*)?," + // Course "(\\d{2})(\\d{2})(\\d{2})" + // Date (DDMMYY) ".+"); // Other (Checksumm) - /** - * Decode message - */ @Override protected Object decode( ChannelHandlerContext ctx, Channel channel, Object msg) diff --git a/test/org/traccar/protocol/T55ProtocolDecoderTest.java b/test/org/traccar/protocol/T55ProtocolDecoderTest.java index 6d639ee8c..f7aac7030 100644 --- a/test/org/traccar/protocol/T55ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/T55ProtocolDecoderTest.java @@ -19,6 +19,9 @@ public class T55ProtocolDecoderTest { assertNotNull(decoder.decode(null, null, "$GPRMC,115528.000,A,6000.5432,N,03020.4948,E,,,091111,,*06")); + + assertNotNull(decoder.decode(null, null, + "$GPRMC,064411.000,A,3717.240078,N,00603.046984,W,0.000,1,010313,,,A*6C")); } |