diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-12 21:45:59 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-12 21:45:59 +1200 |
commit | 9cc4cb27a5de80794f11a2e659ecde0e44bbb7b6 (patch) | |
tree | 75862e3d902e50fd132f3e6b5311bddfa1fde0f1 /src/org/traccar/protocol | |
parent | 1a43a20487bf187c6c759eedce273b38159ea140 (diff) | |
download | traccar-server-9cc4cb27a5de80794f11a2e659ecde0e44bbb7b6.tar.gz traccar-server-9cc4cb27a5de80794f11a2e659ecde0e44bbb7b6.tar.bz2 traccar-server-9cc4cb27a5de80794f11a2e659ecde0e44bbb7b6.zip |
Improve PT502 decoder pattern
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/Pt502ProtocolDecoder.java | 7 |
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
|