aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-07-27 12:27:10 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-07-27 12:27:10 +1200
commit5f75f109dfc1140d2f644857d877baf88cb1fe83 (patch)
treebd5f5112eea031f8d1900916e970d9b0edc375dc /src/org/traccar
parent0032fdd6fd9773be320e79ae74f0e6396d8a3625 (diff)
downloadtrackermap-server-5f75f109dfc1140d2f644857d877baf88cb1fe83.tar.gz
trackermap-server-5f75f109dfc1140d2f644857d877baf88cb1fe83.tar.bz2
trackermap-server-5f75f109dfc1140d2f644857d877baf88cb1fe83.zip
Fix V680 decoder
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/V680ProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
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++));