diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-15 16:58:10 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-15 16:58:10 -0700 |
commit | bac331ebf2a67d0bdc4f96c78f0dfbeb0c4b6da6 (patch) | |
tree | a5eb54aa7164e74e953c6d89fcc5e457ddab67e4 /src/main/java/org/traccar | |
parent | 7a0e14eda651314d7bd076c882dd872964b16832 (diff) | |
download | trackermap-server-bac331ebf2a67d0bdc4f96c78f0dfbeb0c4b6da6.tar.gz trackermap-server-bac331ebf2a67d0bdc4f96c78f0dfbeb0c4b6da6.tar.bz2 trackermap-server-bac331ebf2a67d0bdc4f96c78f0dfbeb0c4b6da6.zip |
Handle Startek OBD issue
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/protocol/StartekProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/StartekProtocolDecoder.java b/src/main/java/org/traccar/protocol/StartekProtocolDecoder.java index c1869def2..8a7b5cec7 100644 --- a/src/main/java/org/traccar/protocol/StartekProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/StartekProtocolDecoder.java @@ -42,7 +42,6 @@ public class StartekProtocolDecoder extends BaseProtocolDecoder { .number("d+,") // length .number("(d+),") // imei .expression("(.+)") // content - .number("xx") // checksum .compile(); private static final Pattern PATTERN_POSITION = new PatternBuilder() @@ -123,6 +122,9 @@ public class StartekProtocolDecoder extends BaseProtocolDecoder { } String content = parser.next(); + if (content.charAt(content.length() - 2 - 1) != '|') { + content = content.substring(0, content.length() - 2); + } if (content.length() < 100) { Position position = new Position(getProtocolName()); |