aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
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
parentce26a0768ace197cc9afdfc3ee04f970699d3c5e (diff)
downloadtrackermap-server-3639bc6d289fa137d5dc7aaa47b67cd6a6bcc47d.tar.gz
trackermap-server-3639bc6d289fa137d5dc7aaa47b67cd6a6bcc47d.tar.bz2
trackermap-server-3639bc6d289fa137d5dc7aaa47b67cd6a6bcc47d.zip
Rename config switch
Diffstat (limited to 'src/org/traccar')
-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;
}