From 20a46c0a9998f14c8770d9b7797c6a566e28ad94 Mon Sep 17 00:00:00 2001 From: Kevin Goos Date: Mon, 25 Jun 2018 11:21:33 +0200 Subject: 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) --- src/org/traccar/protocol/LaipacProtocolDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/protocol') 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()); -- cgit v1.2.3