From a79386202fcf1feb86b7770cbbbcfe65fa4a95ca Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 1 Mar 2018 15:31:05 +1300 Subject: Handle H02 message new line --- src/org/traccar/protocol/H02ProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java index 5ee663ee1..9764adf04 100644 --- a/src/org/traccar/protocol/H02ProtocolDecoder.java +++ b/src/org/traccar/protocol/H02ProtocolDecoder.java @@ -456,7 +456,7 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder { switch (marker) { case "*": - String sentence = buf.toString(StandardCharsets.US_ASCII); + String sentence = buf.toString(StandardCharsets.US_ASCII).trim(); int typeStart = sentence.indexOf(',', sentence.indexOf(',') + 1) + 1; int typeEnd = sentence.indexOf(',', typeStart); if (typeEnd > 0) { -- cgit v1.2.3