aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/BaseProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/BaseProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/BaseProtocolDecoder.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/BaseProtocolDecoder.java b/src/main/java/org/traccar/BaseProtocolDecoder.java
index aa5be612e..f0642f509 100644
--- a/src/main/java/org/traccar/BaseProtocolDecoder.java
+++ b/src/main/java/org/traccar/BaseProtocolDecoder.java
@@ -184,7 +184,9 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
}
}
- public void getLastLocation(Position position, Date deviceTime) {
+ public boolean getLastLocation(Position position, Date deviceTime) {
+ boolean found = false;
+
if (position.getDeviceId() != 0) {
position.setOutdated(true);
@@ -198,6 +200,7 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
position.setSpeed(last.getSpeed());
position.setCourse(last.getCourse());
position.setAccuracy(last.getAccuracy());
+ found = true;
} else {
position.setFixTime(new Date(0));
}
@@ -208,6 +211,8 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
position.setDeviceTime(new Date());
}
}
+
+ return found;
}
@Override