aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/handler
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/handler')
-rw-r--r--src/main/java/org/traccar/handler/events/OverspeedEventHandler.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/handler/events/OverspeedEventHandler.java b/src/main/java/org/traccar/handler/events/OverspeedEventHandler.java
index 94fdc4699..3bb5f713c 100644
--- a/src/main/java/org/traccar/handler/events/OverspeedEventHandler.java
+++ b/src/main/java/org/traccar/handler/events/OverspeedEventHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 - 2022 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2023 Anton Tananaev (anton@traccar.org)
* Copyright 2018 Andrey Kunitsyn (andrey@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -52,6 +52,7 @@ public class OverspeedEventHandler extends BaseEventHandler {
private final long minimalDuration;
private final boolean preferLowest;
+ private final double multiplier;
@Inject
public OverspeedEventHandler(
@@ -60,6 +61,7 @@ public class OverspeedEventHandler extends BaseEventHandler {
this.storage = storage;
minimalDuration = config.getLong(Keys.EVENT_OVERSPEED_MINIMAL_DURATION) * 1000;
preferLowest = config.getBoolean(Keys.EVENT_OVERSPEED_PREFER_LOWEST);
+ multiplier = config.getDouble(Keys.EVENT_OVERSPEED_THRESHOLD_MULTIPLIER);
}
@Override
@@ -107,7 +109,7 @@ public class OverspeedEventHandler extends BaseEventHandler {
}
OverspeedState state = OverspeedState.fromDevice(device);
- OverspeedProcessor.updateState(state, position, speedLimit, minimalDuration, overspeedGeofenceId);
+ OverspeedProcessor.updateState(state, position, speedLimit, multiplier, minimalDuration, overspeedGeofenceId);
if (state.isChanged()) {
state.toDevice(device);
try {