aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-07-21 07:39:24 -0700
committerAnton Tananaev <anton@traccar.org>2023-07-21 07:39:24 -0700
commitc85df48c0ff76979839f62120fd311073e0c1d80 (patch)
tree9d323a6c706c78d01335595194640c06112b09c5 /src
parent6631d7c4b3522e81af563e3ac82131a6e5c50b89 (diff)
downloadtrackermap-server-c85df48c0ff76979839f62120fd311073e0c1d80.tar.gz
trackermap-server-c85df48c0ff76979839f62120fd311073e0c1d80.tar.bz2
trackermap-server-c85df48c0ff76979839f62120fd311073e0c1d80.zip
Fix Fifotrack Q3 missing time
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java2
-rw-r--r--src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java
index c30398d36..87587aa1e 100644
--- a/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java
@@ -242,6 +242,8 @@ public class FifotrackProtocolDecoder extends BaseProtocolDecoder {
} else {
+ getLastLocation(position, position.getDeviceTime());
+
String[] points = parser.next().split("\\|");
for (String point : points) {
String[] wifi = point.split(":");
diff --git a/src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java
index cbfc46703..77778d885 100644
--- a/src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java
@@ -11,6 +11,9 @@ public class FifotrackProtocolDecoderTest extends ProtocolTest {
var decoder = inject(new FifotrackProtocolDecoder(null));
+ verifyAttributes(decoder, buffer(
+ "$$159,866344056951341,399D,A03,,230716222659,240|8|2724|20EEF33,4.20,100,003E,1,AE233FC0D2E0:-65|3E286D5FB6E8:-65|28BD890A4A0E:-67|8ED81B5DFC3A:-70|8AD81B5DFC3A:-70*5F"));
+
verifyAttribute(decoder, buffer(
"$$99,865413050150407,7F,A03,,230626072722,460|0|25FC|AC2AB0B,3.74,52,0019,0,A,0,13,22.643466,114.018211*74"),
Position.KEY_SATELLITES, 13);