aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/Stl060ProtocolDecoder.java7
-rw-r--r--test/org/traccar/protocol/Stl060ProtocolDecoderTest.java7
2 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/Stl060ProtocolDecoder.java b/src/org/traccar/protocol/Stl060ProtocolDecoder.java
index f23b7be73..30dc4ab5c 100644
--- a/src/org/traccar/protocol/Stl060ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Stl060ProtocolDecoder.java
@@ -19,10 +19,8 @@ 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;
@@ -33,6 +31,9 @@ public class Stl060ProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
+ //$1,357804047969310,D001,AP29AW0963,01/01/13,13:24:47,1723.9582N,07834.0945E
+ //,00100,010,0,0,0,0,
+ //0,0008478660,1450,40,34,0,0,0,A
private static final Pattern pattern = Pattern.compile(
".*\\$1," +
"(\\d+)," + // IMEI
@@ -55,7 +56,7 @@ public class Stl060ProtocolDecoder extends BaseProtocolDecoder {
"([01])," + // Ignition
"0,0," + // Reserved
"(\\d+)," + // DI
- "([^,])," + // RFID
+ "([^,]+)," + // RFID
"(\\d+)," + // Odometer
"(\\d+)," + // Temperature
"(\\d+)," + // Fuel
diff --git a/test/org/traccar/protocol/Stl060ProtocolDecoderTest.java b/test/org/traccar/protocol/Stl060ProtocolDecoderTest.java
index 7766e104e..4b3ec36fb 100644
--- a/test/org/traccar/protocol/Stl060ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Stl060ProtocolDecoderTest.java
@@ -1,8 +1,7 @@
package org.traccar.protocol;
-import org.traccar.helper.TestDataManager;
-import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
+import static org.traccar.helper.DecoderVerifier.verify;
public class Stl060ProtocolDecoderTest extends ProtocolDecoderTest {
@@ -20,8 +19,8 @@ public class Stl060ProtocolDecoderTest extends ProtocolDecoderTest {
verify(decoder.decode(null, null,
"$1,357804047969310,D001,AP29AW0963,01/01/13,13:24:47,1723.9582N,07834.0945E,00100,010,0,0,0,0,0,A,"));
- //verify(decoder.decode(null, null,
- // "$1,357804047969310,D001,AP29AW0963,01/01/13,13:24:47,1723.9582N,07834.0945E,00100,010,0,0,0,0,0,0008478660,1450,40,34,0,0,0,A"));
+ verify(decoder.decode(null, null,
+ "$1,357804047969310,D001,AP29AW0963,01/01/13,13:24:47,1723.9582N,07834.0945E,00100,010,0,0,0,0,0,0008478660,1450,40,34,0,0,0,A"));
}