aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin Goos <kevin.goos@infrabel.be>2018-06-25 11:21:33 +0200
committerKevin Goos <kevin.goos@infrabel.be>2018-06-25 11:21:33 +0200
commit20a46c0a9998f14c8770d9b7797c6a566e28ad94 (patch)
treeddfbcc58f740092b4de9e34db4aad46d3d8ec20b /src
parent37b76e674f381b3750ba61b3ccfa423ec0c8a2ec (diff)
downloadtrackermap-server-20a46c0a9998f14c8770d9b7797c6a566e28ad94.tar.gz
trackermap-server-20a46c0a9998f14c8770d9b7797c6a566e28ad94.tar.bz2
trackermap-server-20a46c0a9998f14c8770d9b7797c6a566e28ad94.zip
Added validation of other statuses (R: repeating the message when the package was not received) and (P: send when GPS receiver didn't move but there is a valid location avaible)
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/LaipacProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/LaipacProtocolDecoder.java b/src/org/traccar/protocol/LaipacProtocolDecoder.java
index 8634a0e32..9232cd6f0 100644
--- a/src/org/traccar/protocol/LaipacProtocolDecoder.java
+++ b/src/org/traccar/protocol/LaipacProtocolDecoder.java
@@ -115,7 +115,8 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder {
.setTime(parser.nextInt(0), parser.nextInt(0), parser.nextInt(0));
String status = parser.next();
- position.setValid(status.toUpperCase().equals("A"));
+ String upperCaseStatus = status.toUpperCase();
+ position.setValid(upperCaseStatus.equals("A") || upperCaseStatus.equals("R") || upperCaseStatus.equals("P"));
position.set(Position.KEY_STATUS, status);
position.setLatitude(parser.nextCoordinate());