aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-16 11:33:26 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-16 11:33:26 +1300
commitc7d721cfc55b614ab4bf3d656381b7b590ae99e9 (patch)
treef43daabf7b46ebb04b9e22946767b5d5f7f95199 /src/org
parent3563910f1b551c02db5dffc9745bd8aba9cbeeeb (diff)
downloadtrackermap-server-c7d721cfc55b614ab4bf3d656381b7b590ae99e9.tar.gz
trackermap-server-c7d721cfc55b614ab4bf3d656381b7b590ae99e9.tar.bz2
trackermap-server-c7d721cfc55b614ab4bf3d656381b7b590ae99e9.zip
Add outdated position boolean flag
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java2
-rw-r--r--src/org/traccar/model/Position.java10
2 files changed, 12 insertions, 0 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java
index f8abdcc85..bd91f5e09 100644
--- a/src/org/traccar/BaseProtocolDecoder.java
+++ b/src/org/traccar/BaseProtocolDecoder.java
@@ -75,6 +75,8 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
}
public void getLastLocation(Position position, Date deviceTime) {
+ position.setOutdated(true);
+
Position last = Context.getConnectionManager().getLastPosition(getDeviceId());
if (last != null) {
position.setFixTime(last.getFixTime());
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index 1ed559ecd..9494da042 100644
--- a/src/org/traccar/model/Position.java
+++ b/src/org/traccar/model/Position.java
@@ -47,6 +47,16 @@ public class Position extends Event implements Factory {
setFixTime(time);
}
+ private boolean outdated;
+
+ public boolean getOutdated() {
+ return outdated;
+ }
+
+ public void setOutdated(boolean outdated) {
+ this.outdated = outdated;
+ }
+
private boolean valid;
public boolean getValid() {