aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/CradlepointProtocolDecoder.java8
-rw-r--r--test/org/traccar/protocol/CradlepointProtocolDecoderTest.java6
2 files changed, 10 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/CradlepointProtocolDecoder.java b/src/org/traccar/protocol/CradlepointProtocolDecoder.java
index a1b42edf9..67a140cf7 100644
--- a/src/org/traccar/protocol/CradlepointProtocolDecoder.java
+++ b/src/org/traccar/protocol/CradlepointProtocolDecoder.java
@@ -40,11 +40,11 @@ public class CradlepointProtocolDecoder extends BaseProtocolDecoder {
.expression("([EW]),")
.number("(d+.d+)?,") // speed
.number("(d+.d+)?,") // course
- .expression("([^,]+),") // carrier
+ .expression("([^,]+)?,") // carrier
.expression("([^,]+)?,") // serdis
- .number("(-?d+),") // rsrp
- .number("(-?d+),") // rssi
- .number("(-?d+),") // rsrq
+ .number("(-?d+)?,") // rsrp
+ .number("(-?d+)?,") // rssi
+ .number("(-?d+)?,") // rsrq
.expression("([^,]+)?,") // ecio
.expression("([^,]+)?") // wan ip
.compile();
diff --git a/test/org/traccar/protocol/CradlepointProtocolDecoderTest.java b/test/org/traccar/protocol/CradlepointProtocolDecoderTest.java
index 4f37d3e1e..7eae791d5 100644
--- a/test/org/traccar/protocol/CradlepointProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CradlepointProtocolDecoderTest.java
@@ -11,6 +11,12 @@ public class CradlepointProtocolDecoderTest extends ProtocolTest {
CradlepointProtocolDecoder decoder = new CradlepointProtocolDecoder(new CradlepointProtocol());
verifyPosition(decoder, text(
+ "353547063544681,170515,3613.25,N,11559.14,W,0.0,,,,,,,,"));
+
+ verifyPosition(decoder, text(
+ "353547060558130,170519,4337.17,N,11612.34,W,0.0,294.7,,,,,,,"));
+
+ verifyPosition(decoder, text(
"+12084014675,162658,4337.174385,N,11612.338373,W,0.0,,Verizon,,-71,-44,-11,,"));
}