aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-01-07 08:52:10 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-01-07 08:52:10 -0800
commit73228519ae738f20e1d6d601007f0afc4a9ed3ac (patch)
tree2ac4c4f7bc5d93486af67e4afe7cd78a907c66a3
parentd0a7032d6e391fc2148d8d91baf1543ac403af96 (diff)
downloadtrackermap-server-73228519ae738f20e1d6d601007f0afc4a9ed3ac.tar.gz
trackermap-server-73228519ae738f20e1d6d601007f0afc4a9ed3ac.tar.bz2
trackermap-server-73228519ae738f20e1d6d601007f0afc4a9ed3ac.zip
Ignore no GPS data
-rw-r--r--src/main/java/org/traccar/protocol/PstProtocolDecoder.java2
-rw-r--r--src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/PstProtocolDecoder.java b/src/main/java/org/traccar/protocol/PstProtocolDecoder.java
index 40caa9727..a93dd251f 100644
--- a/src/main/java/org/traccar/protocol/PstProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/PstProtocolDecoder.java
@@ -102,7 +102,7 @@ public class PstProtocolDecoder extends BaseProtocolDecoder {
}
}
- return position;
+ return position.getFixTime() != null ? position : null;
}
return null;
diff --git a/src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java
index 9c3d2108e..cab8dc1a0 100644
--- a/src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java
@@ -11,6 +11,9 @@ public class PstProtocolDecoderTest extends ProtocolTest {
PstProtocolDecoder decoder = new PstProtocolDecoder(null);
verifyNull(decoder, binary(
+ "2faf9b4c0600000012054f36ec194000bfa9"));
+
+ verifyNull(decoder, binary(
"2faf9b5605e40000e0022faf9b560196cb2f003f0c72ab56129ae0847ac98801cd1ed8"));
verifyNull(decoder, binary(