diff options
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; } |