aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-04-17 06:23:32 -0700
committerAnton Tananaev <anton@traccar.org>2024-04-17 06:23:32 -0700
commit8458c3f3cbf6a42fde3d455c9c231498ca0fa184 (patch)
tree3d2a215239be7429291670a1212eda1f2e9cdf92
parent132f619e996328c6fcb68d824b63edba69c8a2d6 (diff)
downloadtrackermap-server-8458c3f3cbf6a42fde3d455c9c231498ca0fa184.tar.gz
trackermap-server-8458c3f3cbf6a42fde3d455c9c231498ca0fa184.tar.bz2
trackermap-server-8458c3f3cbf6a42fde3d455c9c231498ca0fa184.zip
Fix Snapper position decoding
-rw-r--r--src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java1
-rw-r--r--src/test/java/org/traccar/protocol/SnapperProtocolDecoderTest.java5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java b/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java
index 315731c20..5e513d954 100644
--- a/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java
@@ -205,6 +205,7 @@ public class SnapperProtocolDecoder extends BaseProtocolDecoder {
break;
}
}
+ return position;
default:
return null;
}
diff --git a/src/test/java/org/traccar/protocol/SnapperProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SnapperProtocolDecoderTest.java
index 103f1f48e..7f16d6f3b 100644
--- a/src/test/java/org/traccar/protocol/SnapperProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SnapperProtocolDecoderTest.java
@@ -13,9 +13,12 @@ public class SnapperProtocolDecoderTest extends ProtocolTest {
verifyNull(decoder, binary(
"4b0341a6b0c608000040000005000000000000007d5e14010068656c6c6f"));
- verifyNull(decoder, binary(
+ verifyPosition(decoder, binary(
"4b044daff87aff5b8aad00007b010000000013ea0c006837000500210008003e000058c48fa94823001900000080000200018080000002deff0f0003404000000400000034008c007b2273223a22303034303438222c226332223a2230303030303030303030303030303030222c226132223a2230303030303030303030303030303030222c226f223a2230303030222c2274223a2230303030222c227a223a223030222c2277223a223030222c2272223a222d222c226d223a223030303030303030222c2262223a223030303030303030227d320079007b2266223a224445222c2274223a22303932383336222c2264223a22313530343234222c226c61223a22353334312e34333732222c226c6f223a2230303935342e30373036222c2261223a22382e34222c2273223a22302e3030222c2263223a2232362e3036222c227376223a223135222c2270223a22227d33003f007b2263223a22323632222c226e223a223033222c2262223a5b7b226c223a2232423334222c2263223a223030303041313231222c2273223a223132227d5d7d"));
+ verifyPosition(decoder, binary(
+ "4b044daff87aff5b8aad0000430100000000bb870c005b37000500210008003e0100ffffffff7f2300190000007f000000018080000002deff080003404000000400000034008c007b2273223a22303034303438222c226332223a2230303030303030303030303030303030222c226132223a2230303030303030303030303030303030222c226f223a2230303030222c2274223a2230303030222c227a223a223030222c2277223a223030222c2272223a222d222c226d223a223030303030303030222c2262223a223030303030303030227d320079007b2266223a224445222c2274223a22303832303335222c2264223a22313730343234222c226c61223a22353334312e34323635222c226c6f223a2230303935342e30373935222c2261223a22362e32222c2273223a22322e3237222c2263223a2233302e3135222c227376223a223038222c2270223a22227d330007007b2262223a5d7d"));
+
}
}