From 3c7afdf75c4f3d045c0d51355d6ce62622eb2c4d Mon Sep 17 00:00:00 2001 From: jcardus Date: Wed, 26 Oct 2022 15:02:22 +0100 Subject: Update MaintenanceEventHandler.java trailing spaces --- src/main/java/org/traccar/handler/events/MaintenanceEventHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/org/traccar') diff --git a/src/main/java/org/traccar/handler/events/MaintenanceEventHandler.java b/src/main/java/org/traccar/handler/events/MaintenanceEventHandler.java index 25a622373..909950acf 100644 --- a/src/main/java/org/traccar/handler/events/MaintenanceEventHandler.java +++ b/src/main/java/org/traccar/handler/events/MaintenanceEventHandler.java @@ -52,7 +52,7 @@ public class MaintenanceEventHandler extends BaseEventHandler { double oldValue = lastPosition.getDouble(maintenance.getType()); double newValue = position.getDouble(maintenance.getType()); if (oldValue != 0.0 && newValue != 0.0 && newValue >= maintenance.getStart()) { - if (oldValue < maintenance.getStart() + if (oldValue < maintenance.getStart() || (long) ((oldValue - maintenance.getStart()) / maintenance.getPeriod()) < (long) ((newValue - maintenance.getStart()) / maintenance.getPeriod())) { Event event = new Event(Event.TYPE_MAINTENANCE, position); -- cgit v1.2.3