diff options
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/events/FuelDropEventHandler.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/events/FuelDropEventHandler.java b/src/org/traccar/events/FuelDropEventHandler.java index a035d408f..e9a261aea 100644 --- a/src/org/traccar/events/FuelDropEventHandler.java +++ b/src/org/traccar/events/FuelDropEventHandler.java @@ -47,7 +47,8 @@ public class FuelDropEventHandler extends BaseEventHandler { if (position.getAttributes().containsKey(Position.KEY_FUEL_LEVEL) && lastPosition != null && lastPosition.getAttributes().containsKey(Position.KEY_FUEL_LEVEL)) { - double drop = lastPosition.getDouble(Position.KEY_FUEL_LEVEL) - position.getDouble(Position.KEY_FUEL_LEVEL); + double drop = lastPosition.getDouble(Position.KEY_FUEL_LEVEL) + - position.getDouble(Position.KEY_FUEL_LEVEL); if (drop >= fuelDropThreshold) { Event event = new Event(Event.TYPE_DEVICE_FUEL_DROP, position.getDeviceId(), position.getId()); event.set(ATTRIBUTE_FUEL_DROP_THRESHOLD, fuelDropThreshold); |