aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/Context.java2
-rw-r--r--src/org/traccar/events/OverspeedEventHandler.java10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index b7cfd27b0..23d0a983e 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -465,7 +465,7 @@ public final class Context {
overspeedEventHandler = new OverspeedEventHandler(
Context.getConfig().getLong("event.overspeed.minimalDuration") * 1000,
Context.getConfig().getBoolean("event.overspeed.notRepeat"),
- Context.getConfig().getBoolean("event.overspeed.geofenceMinimal"));
+ Context.getConfig().getBoolean("event.overspeed.preferLowest"));
}
public static void init(IdentityManager testIdentityManager) {
diff --git a/src/org/traccar/events/OverspeedEventHandler.java b/src/org/traccar/events/OverspeedEventHandler.java
index 223a117ad..4ebe43fda 100644
--- a/src/org/traccar/events/OverspeedEventHandler.java
+++ b/src/org/traccar/events/OverspeedEventHandler.java
@@ -32,13 +32,13 @@ public class OverspeedEventHandler extends BaseEventHandler {
public static final String ATTRIBUTE_SPEED_LIMIT = "speedLimit";
private boolean notRepeat;
- private boolean geofenceMinimal;
+ private boolean preferLowest;
private long minimalDuration;
- public OverspeedEventHandler(long minimalDuration, boolean notRepeat, boolean geofenceMinimal) {
+ public OverspeedEventHandler(long minimalDuration, boolean notRepeat, boolean preferLowest) {
this.notRepeat = notRepeat;
this.minimalDuration = minimalDuration;
- this.geofenceMinimal = geofenceMinimal;
+ this.preferLowest = preferLowest;
}
private Map<Event, Position> newEvent(DeviceState deviceState, double speedLimit) {
@@ -121,8 +121,8 @@ public class OverspeedEventHandler extends BaseEventHandler {
if (geofence != null) {
double currentSpeedLimit = geofence.getDouble(ATTRIBUTE_SPEED_LIMIT);
if (currentSpeedLimit > 0 && geofenceSpeedLimit == 0
- || geofenceMinimal && currentSpeedLimit < geofenceSpeedLimit
- || !geofenceMinimal && currentSpeedLimit > geofenceSpeedLimit) {
+ || preferLowest && currentSpeedLimit < geofenceSpeedLimit
+ || !preferLowest && currentSpeedLimit > geofenceSpeedLimit) {
geofenceSpeedLimit = currentSpeedLimit;
overspeedGeofenceId = geofenceId;
}