diff options
author | Abyss777 <abyss@fox5.ru> | 2017-09-21 10:53:55 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-09-21 10:53:55 +0500 |
commit | 6aaa8dd3b3ffff7927325616efb9b9bdd8228a67 (patch) | |
tree | caf0bc9b04df133a9751df5bc3996acb2f400db2 /src/org/traccar/events | |
parent | 06bdcf65a08b233f6c56ddf4774287c0c0232597 (diff) | |
download | trackermap-server-6aaa8dd3b3ffff7927325616efb9b9bdd8228a67.tar.gz trackermap-server-6aaa8dd3b3ffff7927325616efb9b9bdd8228a67.tar.bz2 trackermap-server-6aaa8dd3b3ffff7927325616efb9b9bdd8228a67.zip |
Make check for valid in MotionEventHandler optional
Diffstat (limited to 'src/org/traccar/events')
-rw-r--r-- | src/org/traccar/events/FuelDropEventHandler.java | 2 | ||||
-rw-r--r-- | src/org/traccar/events/MotionEventHandler.java | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/events/FuelDropEventHandler.java b/src/org/traccar/events/FuelDropEventHandler.java index 4fc512162..2ee3e1a58 100644 --- a/src/org/traccar/events/FuelDropEventHandler.java +++ b/src/org/traccar/events/FuelDropEventHandler.java @@ -35,7 +35,7 @@ public class FuelDropEventHandler extends BaseEventHandler { if (device == null) { return null; } - if (!Context.getIdentityManager().isLatestPosition(position) || !position.getValid()) { + if (!Context.getIdentityManager().isLatestPosition(position)) { return null; } diff --git a/src/org/traccar/events/MotionEventHandler.java b/src/org/traccar/events/MotionEventHandler.java index ae64c10ea..0c1c4848f 100644 --- a/src/org/traccar/events/MotionEventHandler.java +++ b/src/org/traccar/events/MotionEventHandler.java @@ -109,7 +109,8 @@ public class MotionEventHandler extends BaseEventHandler { if (device == null) { return null; } - if (!Context.getIdentityManager().isLatestPosition(position) || !position.getValid()) { + if (!Context.getIdentityManager().isLatestPosition(position) + || !tripsConfig.getProcessInvalidPositions() && !position.getValid()) { return null; } |