aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/events
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-11-24 21:20:57 +1300
committerGitHub <noreply@github.com>2016-11-24 21:20:57 +1300
commitb1b5e5ce805064229f0c22ee7e898efa32d22e1a (patch)
treec708c8f12342c33070d5f8ee0fe0a31034aa2664 /src/org/traccar/events
parent3e1a25b54ab342bedc8d688bb6ccb3c2d6c60d0c (diff)
parent1424c2048346206f750bd68232ba6e2cbe1545e9 (diff)
downloadtrackermap-server-b1b5e5ce805064229f0c22ee7e898efa32d22e1a.tar.gz
trackermap-server-b1b5e5ce805064229f0c22ee7e898efa32d22e1a.tar.bz2
trackermap-server-b1b5e5ce805064229f0c22ee7e898efa32d22e1a.zip
Merge pull request #2596 from Abyss777/lookup_simplify
Combine lookupAttribute helpers
Diffstat (limited to 'src/org/traccar/events')
-rw-r--r--src/org/traccar/events/MaintenanceEventHandler.java4
-rw-r--r--src/org/traccar/events/OverspeedEventHandler.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/events/MaintenanceEventHandler.java b/src/org/traccar/events/MaintenanceEventHandler.java
index f423e035b..5a36a74d1 100644
--- a/src/org/traccar/events/MaintenanceEventHandler.java
+++ b/src/org/traccar/events/MaintenanceEventHandler.java
@@ -38,12 +38,12 @@ public class MaintenanceEventHandler extends BaseEventHandler {
}
double maintenanceInterval = Context.getDeviceManager()
- .lookupServerDouble(device.getId(), ATTRIBUTE_MAINTENANCE_INTERVAL, 0);
+ .lookupAttributeDouble(device.getId(), ATTRIBUTE_MAINTENANCE_INTERVAL, 0, false);
if (maintenanceInterval == 0) {
return null;
}
double maintenanceStart = Context.getDeviceManager()
- .lookupServerDouble(device.getId(), ATTRIBUTE_MAINTENANCE_START, 0);
+ .lookupAttributeDouble(device.getId(), ATTRIBUTE_MAINTENANCE_START, 0, false);
Collection<Event> events = new ArrayList<>();
double oldTotalDistance = 0.0;
diff --git a/src/org/traccar/events/OverspeedEventHandler.java b/src/org/traccar/events/OverspeedEventHandler.java
index c3e3e19cb..505d706f4 100644
--- a/src/org/traccar/events/OverspeedEventHandler.java
+++ b/src/org/traccar/events/OverspeedEventHandler.java
@@ -48,7 +48,7 @@ public class OverspeedEventHandler extends BaseEventHandler {
Collection<Event> events = new ArrayList<>();
double speed = position.getSpeed();
double speedLimit = Context.getDeviceManager()
- .lookupServerDouble(device.getId(), ATTRIBUTE_SPEED_LIMIT, 0);
+ .lookupAttributeDouble(device.getId(), ATTRIBUTE_SPEED_LIMIT, 0, false);
if (speedLimit == 0) {
return null;
}