aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-29 11:10:21 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-29 11:10:21 +1200
commit3591ef137ae12e5401fc148a637799949ec5c2a7 (patch)
tree86a12bf995c5edafb18a53e0fda43eb4e79ad1a9 /src/org/traccar
parent62be0e87ba78683cac5dd1ea07325c4beb9352b8 (diff)
downloadtraccar-server-3591ef137ae12e5401fc148a637799949ec5c2a7.tar.gz
traccar-server-3591ef137ae12e5401fc148a637799949ec5c2a7.tar.bz2
traccar-server-3591ef137ae12e5401fc148a637799949ec5c2a7.zip
Fix Box regex pattern
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/BoxProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/BoxProtocolDecoder.java b/src/org/traccar/protocol/BoxProtocolDecoder.java
index ffc9f9bd0..2230b1356 100644
--- a/src/org/traccar/protocol/BoxProtocolDecoder.java
+++ b/src/org/traccar/protocol/BoxProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2014 - 2015 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ public class BoxProtocolDecoder extends BaseProtocolDecoder {
"(-?\\d+\\.\\d+)," + // Longitude
"(\\d+\\.?\\d*)," + // Speed
"(\\d+\\.?\\d*)," + // Course
- "(\\d+)," + // Distance
+ "(\\d+\\.?\\d*)," + // Distance
"(\\d+)," + // Event
"(\\d+)" + // Status
".*");
@@ -62,7 +62,7 @@ public class BoxProtocolDecoder extends BaseProtocolDecoder {
identify(id, channel);
}
- else if (sentence.startsWith("L,")) {
+ else if (hasDeviceId() && sentence.startsWith("L,")) {
// Parse message
Matcher parser = pattern.matcher(sentence);