aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-03-04 00:07:10 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-03-04 00:07:10 -0800
commit96d7a6c1f8b2563c3b3fb3d4a8737e8c2d606f6e (patch)
tree8a44976e729f59fdec20ebbf6e4d26445ee97c69 /src/main/java
parenta48c68d4b5fb522081c9182713a4088a66317964 (diff)
downloadtrackermap-server-96d7a6c1f8b2563c3b3fb3d4a8737e8c2d606f6e.tar.gz
trackermap-server-96d7a6c1f8b2563c3b3fb3d4a8737e8c2d606f6e.tar.bz2
trackermap-server-96d7a6c1f8b2563c3b3fb3d4a8737e8c2d606f6e.zip
Support TopFlyTech variation
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/T800xProtocolDecoder.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
index 9b146ec90..3331ebb71 100644
--- a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2019 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2020 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -177,8 +177,7 @@ public class T800xProtocolDecoder extends BaseProtocolDecoder {
}
private Position decodePosition(
- Channel channel, DeviceSession deviceSession,
- ByteBuf buf, int type, int index, ByteBuf imei) {
+ Channel channel, DeviceSession deviceSession, ByteBuf buf, int type, int index, ByteBuf imei) {
Position position = new Position(getProtocolName());
position.setDeviceId(deviceSession.getDeviceId());
@@ -214,8 +213,10 @@ public class T800xProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.PREFIX_OUT + (i + 1), BitUtil.check(io, 7 + i));
}
- position.set(Position.PREFIX_ADC + 1, buf.readUnsignedShort());
- position.set(Position.PREFIX_ADC + 2, buf.readUnsignedShort());
+ if (header != 0x2626) {
+ position.set(Position.PREFIX_ADC + 1, buf.readUnsignedShort());
+ position.set(Position.PREFIX_ADC + 2, buf.readUnsignedShort());
+ }
}