aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-02-14 09:08:14 -0800
committerAnton Tananaev <anton@traccar.org>2023-02-14 09:08:14 -0800
commit782fd787d14bd041c818e25b06f5ebe844854163 (patch)
tree2886a635b5e46901f4083f07dd75e3dfaed2d964 /src/main/java/org
parent33af2928a581eba6a1ba580b5da051612c7b7860 (diff)
downloadtrackermap-server-782fd787d14bd041c818e25b06f5ebe844854163.tar.gz
trackermap-server-782fd787d14bd041c818e25b06f5ebe844854163.tar.bz2
trackermap-server-782fd787d14bd041c818e25b06f5ebe844854163.zip
Tramigo T24 M2MV2 support
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/TramigoProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/protocol/TramigoProtocolDecoder.java b/src/main/java/org/traccar/protocol/TramigoProtocolDecoder.java
index 1296929bc..ddd669b36 100644
--- a/src/main/java/org/traccar/protocol/TramigoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/TramigoProtocolDecoder.java
@@ -153,8 +153,8 @@ public class TramigoProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_STATUS, status);
position.setValid(true);
- position.setLatitude(buf.readInt() * 0.00001);
- position.setLongitude(buf.readInt() * 0.00001);
+ position.setLatitude(buf.readIntLE() * 0.00001);
+ position.setLongitude(buf.readIntLE() * 0.00001);
position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedShortLE()));
position.setCourse(buf.readUnsignedShortLE());
@@ -172,7 +172,7 @@ public class TramigoProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedByte(); // reserved
break;
case 1:
- buf.skipBytes(buf.readUnsignedShortLE()); // landmark
+ buf.skipBytes(buf.readUnsignedShortLE() - 3); // landmark
break;
case 4:
buf.skipBytes(53); // trip
@@ -191,7 +191,7 @@ public class TramigoProtocolDecoder extends BaseProtocolDecoder {
buf.skipBytes(40); // analog
break;
case 50:
- buf.skipBytes(buf.readUnsignedShortLE()); // console
+ buf.skipBytes(buf.readUnsignedShortLE() - 3); // console
break;
case 255:
buf.skipBytes(4); // acknowledgement