aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/events
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-05-10 09:04:43 +0500
committerAbyss777 <abyss@fox5.ru>2018-05-11 09:18:34 +0500
commit3639bc6d289fa137d5dc7aaa47b67cd6a6bcc47d (patch)
tree5ac8417da5e0cffaae38d5c61bf4430d93dde56f /src/org/traccar/events
parentce26a0768ace197cc9afdfc3ee04f970699d3c5e (diff)
downloadtraccar-server-3639bc6d289fa137d5dc7aaa47b67cd6a6bcc47d.tar.gz
traccar-server-3639bc6d289fa137d5dc7aaa47b67cd6a6bcc47d.tar.bz2
traccar-server-3639bc6d289fa137d5dc7aaa47b67cd6a6bcc47d.zip
Rename config switch
Diffstat (limited to 'src/org/traccar/events')
-rw-r--r--src/org/traccar/events/OverspeedEventHandler.java10
1 files changed, 5 insertions, 5 deletions
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;
}