aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/events
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-11-24 11:17:49 +0500
committerAbyss777 <abyss@fox5.ru>2016-11-24 11:17:49 +0500
commit7113cff737831d239d30edea7d0661ad89499198 (patch)
tree61ecefcefa066fb40f017c05e969bc4efe1f8d4c /src/org/traccar/events
parent3e1a25b54ab342bedc8d688bb6ccb3c2d6c60d0c (diff)
downloadtraccar-server-7113cff737831d239d30edea7d0661ad89499198.tar.gz
traccar-server-7113cff737831d239d30edea7d0661ad89499198.tar.bz2
traccar-server-7113cff737831d239d30edea7d0661ad89499198.zip
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..9cc4a1aeb 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, true);
if (maintenanceInterval == 0) {
return null;
}
double maintenanceStart = Context.getDeviceManager()
- .lookupServerDouble(device.getId(), ATTRIBUTE_MAINTENANCE_START, 0);
+ .lookupAttributeDouble(device.getId(), ATTRIBUTE_MAINTENANCE_START, 0, true);
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..4e4d7bb66 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, true);
if (speedLimit == 0) {
return null;
}