aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-30 06:49:15 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-03-30 06:49:15 +1300
commit6461a7fad516e46250daca301305f36ba8bab8e6 (patch)
tree8662d707d65acf5eba11792f42d257343bb61edb
parentd344bd8061dd15b0613a7f628decbd8bca3df095 (diff)
downloadtraccar-server-6461a7fad516e46250daca301305f36ba8bab8e6.tar.gz
traccar-server-6461a7fad516e46250daca301305f36ba8bab8e6.tar.bz2
traccar-server-6461a7fad516e46250daca301305f36ba8bab8e6.zip
Fix another Telic issue
-rw-r--r--src/org/traccar/protocol/TelicProtocolDecoder.java6
-rw-r--r--test/org/traccar/protocol/TelicProtocolDecoderTest.java6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/TelicProtocolDecoder.java b/src/org/traccar/protocol/TelicProtocolDecoder.java
index dd20932d9..579a6466b 100644
--- a/src/org/traccar/protocol/TelicProtocolDecoder.java
+++ b/src/org/traccar/protocol/TelicProtocolDecoder.java
@@ -53,8 +53,6 @@ public class TelicProtocolDecoder extends BaseProtocolDecoder {
.number("(d+)?,") // satellites
.expression("(?:[^,]*,){7}")
.number("(d+),") // battery
- .expression("[^,]*,")
- .number("(d+)?") // external
.any()
.compile();
@@ -131,10 +129,6 @@ public class TelicProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_BATTERY, parser.nextInt());
- if (parser.hasNext()) {
- position.set(Position.KEY_POWER, parser.nextInt());
- }
-
return position;
}
diff --git a/test/org/traccar/protocol/TelicProtocolDecoderTest.java b/test/org/traccar/protocol/TelicProtocolDecoderTest.java
index 66ad3db79..74257ee6b 100644
--- a/test/org/traccar/protocol/TelicProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TelicProtocolDecoderTest.java
@@ -11,6 +11,12 @@ public class TelicProtocolDecoderTest extends ProtocolTest {
TelicProtocolDecoder decoder = new TelicProtocolDecoder(new TelicProtocol());
verifyPosition(decoder, text(
+ "442045993198,290317131935,0,290317131935,269158,465748,3,26,183,,,,184,85316567,226,01,00,68,218"));
+
+ verifyPosition(decoder, text(
+ "673091036017,290317131801,0,290317131801,262214,450536,3,40,199,8,,,154,19969553,,0011,00,59,240,0,0406"));
+
+ verifyPosition(decoder, text(
"092020621198,280317084155,0,280317084156,259762,444356,3,42,278,9,,,89,56793311,,0110,00,67,0,,0400"));
verifyPosition(decoder, text(