From 5f75f109dfc1140d2f644857d877baf88cb1fe83 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 27 Jul 2013 12:27:10 +1200 Subject: Fix V680 decoder --- src/org/traccar/protocol/V680ProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/V680ProtocolDecoder.java b/src/org/traccar/protocol/V680ProtocolDecoder.java index 53843c23d..570069116 100644 --- a/src/org/traccar/protocol/V680ProtocolDecoder.java +++ b/src/org/traccar/protocol/V680ProtocolDecoder.java @@ -38,7 +38,7 @@ public class V680ProtocolDecoder extends BaseProtocolDecoder { static private Pattern pattern = Pattern.compile( "(?:#(\\d+)#" + // IMEI "([^#]*)#)?" + // User - "([01])#" + // Fix + "(\\d+)#" + // Fix "([^#]+)#" + // Password "[^#]+#" + "(\\d+)#" + // Packet number @@ -101,7 +101,7 @@ public class V680ProtocolDecoder extends BaseProtocolDecoder { extendedInfo.set("user", parser.group(index++)); // Validity - position.setValid(parser.group(index++).compareTo("1") == 0 ? true : false); + position.setValid(Integer.valueOf(parser.group(index++)) > 0 ? true : false); // Password extendedInfo.set("password", parser.group(index++)); -- cgit v1.2.3