diff options
-rw-r--r-- | src/org/traccar/protocol/GpsGateProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/GpsGateProtocolDecoderTest.java | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/GpsGateProtocolDecoder.java b/src/org/traccar/protocol/GpsGateProtocolDecoder.java index 2ed7b5a19..268f9ea8a 100644 --- a/src/org/traccar/protocol/GpsGateProtocolDecoder.java +++ b/src/org/traccar/protocol/GpsGateProtocolDecoder.java @@ -41,7 +41,7 @@ public class GpsGateProtocolDecoder extends BaseProtocolDecoder { */ private static final Pattern pattern = Pattern.compile( "\\$GPRMC," + - "(\\d{2})(\\d{2})(\\d{2})\\.(\\d+)," + // Time (HHMMSS.SSS) + "(\\d{2})(\\d{2})(\\d{2})\\.?(\\d+)?," + // Time (HHMMSS.SSS) "([AV])," + // Validity "(\\d{2})(\\d{2}\\.\\d+)," + // Latitude (DDMM.MMMM) "([NS])," + diff --git a/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java b/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java index 5fbabbb00..3e1d8d6b9 100644 --- a/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java +++ b/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java @@ -18,9 +18,14 @@ public class GpsGateProtocolDecoderTest { assertNull(decoder.decode(null, null, "$FRLIN,,354503026292842,VGZTHKT*0C")); assertNull(decoder.decode(null, null, "$FRLIN,IMEI,1234123412341234,*7B")); + + assertNull(decoder.decode(null, null, "$FRLIN,,saab93_device,KLRFBGIVDJ*28")); verify(decoder.decode(null, null, "$GPRMC,154403.000,A,6311.64120,N,01438.02740,E,0.000,0.0,270707,,*0A")); + + verify(decoder.decode(null, null, + "$GPRMC,074524,A,5553.73701,N,03728.90491,E,10.39,226.5,160614,0.0,E*75")); } |