From 561647947118a86256dbb584f6da450334462739 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 19 Sep 2022 19:07:26 -0700 Subject: Refactor overspeed handling --- .../org/traccar/handler/events/MotionEventHandler.java | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/main/java/org/traccar/handler/events/MotionEventHandler.java') diff --git a/src/main/java/org/traccar/handler/events/MotionEventHandler.java b/src/main/java/org/traccar/handler/events/MotionEventHandler.java index 1be1896ef..7ef9ec21d 100644 --- a/src/main/java/org/traccar/handler/events/MotionEventHandler.java +++ b/src/main/java/org/traccar/handler/events/MotionEventHandler.java @@ -54,21 +54,6 @@ public class MotionEventHandler extends BaseEventHandler { return Collections.singletonMap(event, position); } - public Map updateMotionState(DeviceState deviceState) { - Map result = null; - if (deviceState.getMotionState() != null && deviceState.getMotionPosition() != null) { - boolean newMotion = !deviceState.getMotionState(); - Position motionPosition = deviceState.getMotionPosition(); - long currentTime = System.currentTimeMillis(); - long motionTime = motionPosition.getFixTime().getTime() - + (newMotion ? tripsConfig.getMinimalTripDuration() : tripsConfig.getMinimalParkingDuration()); - if (motionTime <= currentTime) { - result = newEvent(deviceState, newMotion); - } - } - return result; - } - public Map updateMotionState(DeviceState deviceState, Position position) { return updateMotionState(deviceState, position, position.getBoolean(Position.KEY_MOTION)); } -- cgit v1.2.3