aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java3
-rw-r--r--src/test/java/org/traccar/protocol/MobilogixProtocolDecoderTest.java3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java b/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java
index 8677ba9ec..ac75841a4 100644
--- a/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java
@@ -39,7 +39,7 @@ public class MobilogixProtocolDecoder extends BaseProtocolDecoder {
.text("[")
.number("(dddd)-(dd)-(dd) ") // date (yyyymmdd)
.number("(dd):(dd):(dd),") // time (hhmmss)
- .number("Td,") // type
+ .number("Td+,") // type
.number("d+,") // device type
.expression("[^,]+,") // protocol version
.expression("([^,]+),") // serial number
@@ -86,6 +86,7 @@ public class MobilogixProtocolDecoder extends BaseProtocolDecoder {
if (deviceSession == null) {
return null;
}
+ position.set(Position.KEY_TYPE, type);
position.setDeviceId(deviceSession.getDeviceId());
int status = parser.nextHexInt();
diff --git a/src/test/java/org/traccar/protocol/MobilogixProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MobilogixProtocolDecoderTest.java
index dc60edb15..aff4e42a6 100644
--- a/src/test/java/org/traccar/protocol/MobilogixProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MobilogixProtocolDecoderTest.java
@@ -16,6 +16,9 @@ public class MobilogixProtocolDecoderTest extends ProtocolTest {
verifyPosition(decoder, text(
"[2020-12-01 12:01:09,T3,1,V1.1.1,201951132031,3B,12.99,022,-23.563410,-46.588055,0,0"));
+ verifyPosition(decoder, text(
+ "[2021-09-30 20:06:35,T21,1,V1.3.5,201950130047,37,14.97,092,-23.494715,-46.851341,0,240,4.08,0,19516,4431,0.78,724,10,09111,00771,31,4680"));
+
}
}