aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-08-03 21:17:52 -0700
committerAnton Tananaev <anton@traccar.org>2023-08-03 21:17:52 -0700
commit95fdfd770130b774e6201ddc88bba9241c95e3cc (patch)
tree06b2619d841342b7c6ebca5de6d50a14de9cf041 /src
parent230f629c3dce039aa8856fe2fb4c447a086d72e4 (diff)
downloadtrackermap-server-95fdfd770130b774e6201ddc88bba9241c95e3cc.tar.gz
trackermap-server-95fdfd770130b774e6201ddc88bba9241c95e3cc.tar.bz2
trackermap-server-95fdfd770130b774e6201ddc88bba9241c95e3cc.zip
Fix GT06 protocol conflict
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java7
-rw-r--r--src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java2
2 files changed, 1 insertions, 8 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
index d6d988423..4762fc884 100644
--- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -836,11 +836,6 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
}
}
- if (type == MSG_STATUS && variant == Variant.VXT01) {
- position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.01);
- position.set(Position.KEY_RSSI, buf.readUnsignedByte());
- }
-
if (type == MSG_GPS_LBS_1) {
if (variant == Variant.GT06E_CARD) {
position.set(Position.KEY_ODOMETER, buf.readUnsignedInt());
@@ -1421,8 +1416,6 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
variant = Variant.VXT01;
} else if (header == 0x7878 && type == MSG_GPS_LBS_STATUS_1 && length == 0x24) {
variant = Variant.VXT01;
- } else if (header == 0x7878 && type == MSG_STATUS && length == 0x0a) {
- variant = Variant.VXT01;
} else if (header == 0x7878 && type == MSG_LBS_MULTIPLE_3 && length == 0x31) {
variant = Variant.WANWAY_S20;
} else if (header == 0x7878 && type == MSG_LBS_MULTIPLE_3 && length == 0x2e) {
diff --git a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
index 68579e815..40f268a9d 100644
--- a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
@@ -34,7 +34,7 @@ public class Gt06ProtocolDecoderTest extends ProtocolTest {
verifyAttribute(decoder, binary(
"78780a130604ea04000006bc8a0d0a"),
- Position.KEY_POWER, 0.0);
+ Position.KEY_POWER, null);
verifyAttributes(decoder, binary(
"797900849404414c4d313d43353b414c4d323d43433b414c4d333d35433b535441313d43303b4459443d30313b534f533d303133323838333730302c2c3b43454e5445523d303133323838333730303b46454e43453d46656e63652c4f46462c302c302e3030303030302c302e3030303030302c3330302c494e206f72204f55542c313b00b79d120d0a"));