aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-09-12 21:45:59 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-09-12 21:45:59 +1200
commit9cc4cb27a5de80794f11a2e659ecde0e44bbb7b6 (patch)
tree75862e3d902e50fd132f3e6b5311bddfa1fde0f1 /src/org
parent1a43a20487bf187c6c759eedce273b38159ea140 (diff)
downloadtrackermap-server-9cc4cb27a5de80794f11a2e659ecde0e44bbb7b6.tar.gz
trackermap-server-9cc4cb27a5de80794f11a2e659ecde0e44bbb7b6.tar.bz2
trackermap-server-9cc4cb27a5de80794f11a2e659ecde0e44bbb7b6.zip
Improve PT502 decoder pattern
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/Pt502ProtocolDecoder.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/Pt502ProtocolDecoder.java b/src/org/traccar/protocol/Pt502ProtocolDecoder.java
index 310c345b0..d2436302d 100644
--- a/src/org/traccar/protocol/Pt502ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Pt502ProtocolDecoder.java
@@ -16,15 +16,12 @@
*/
package org.traccar.protocol;
-import java.net.SocketAddress;
+import java.net.SocketAddress;
import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -51,7 +48,7 @@ public class Pt502ProtocolDecoder extends BaseProtocolDecoder {
"./" +
"([01])+," + // Input
"([01])+/" + // Output
- "([^/]+)/" + // ADC
+ "([^/]+)?/" + // ADC
"(\\d+)" + // Odometer
"(?:/([^/]+)?/" + // RFID
"(\\p{XDigit}{3}))?" + // State