aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/SyrusProtocolDecoder.java2
-rw-r--r--test/org/traccar/protocol/SyrusProtocolDecoderTest.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/SyrusProtocolDecoder.java b/src/org/traccar/protocol/SyrusProtocolDecoder.java
index 72347ac03..ee11b35ef 100644
--- a/src/org/traccar/protocol/SyrusProtocolDecoder.java
+++ b/src/org/traccar/protocol/SyrusProtocolDecoder.java
@@ -53,7 +53,7 @@ public class SyrusProtocolDecoder extends BaseProtocolDecoder {
"(\\d{3})" + // Course
"\\d" + // Fix mode
"(\\d)" + // Fix age
- ".*");
+ ".*\r?\n?");
private Date getTime(long week, long day, long seconds) {
Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
diff --git a/test/org/traccar/protocol/SyrusProtocolDecoderTest.java b/test/org/traccar/protocol/SyrusProtocolDecoderTest.java
index 72c06d3fc..9b2457c99 100644
--- a/test/org/traccar/protocol/SyrusProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/SyrusProtocolDecoderTest.java
@@ -26,6 +26,10 @@ public class SyrusProtocolDecoderTest {
assertNotNull(decoder.decode(null, null,
">RPV02138+4555512-0735478000000032;ID=1005;*76<"));
+
+ assertNotNull(decoder.decode(null, null,
+ ">RPV19105+4538405-0739518900000012;ID=9999;*7A<\r\n"));
+
}