From 8896a8fc4091b8d42ec0601360a482ee6c4271a1 Mon Sep 17 00:00:00 2001 From: 31neKl31n3N4chtmu51k <31neKl31n3N4chtmu51k@gmail.com> Date: Sat, 31 May 2014 20:48:32 -0300 Subject: fix in v680: 1) trimmed sentence in v680 protocol decoder to fix 'dropped' messages caused by line feeds that my v680 clone was receiving before the message itself. --- src/org/traccar/protocol/V680ProtocolDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/traccar/protocol/V680ProtocolDecoder.java b/src/org/traccar/protocol/V680ProtocolDecoder.java index ffdbaeb99..ab70b477e 100644 --- a/src/org/traccar/protocol/V680ProtocolDecoder.java +++ b/src/org/traccar/protocol/V680ProtocolDecoder.java @@ -60,7 +60,8 @@ public class V680ProtocolDecoder extends BaseProtocolDecoder { throws Exception { String sentence = (String) msg; - + sentence = sentence.trim(); + // Detect device ID if (sentence.length() == 16) { String imei = sentence.substring(1, sentence.length()); -- cgit v1.2.3