aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/events
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-09-21 23:19:23 +1200
committerGitHub <noreply@github.com>2016-09-21 23:19:23 +1200
commitaff998db51d9fa4b66018139a4c5375a42ff42e8 (patch)
tree5aa7d8823c0ca11f0396ca11de2a6df68ebba048 /src/org/traccar/events
parent9ee812366367148387f289b9977fd809e6a56786 (diff)
parentfbe0190e65ee0646f6521cfca31ecfa3efa10472 (diff)
downloadtrackermap-server-aff998db51d9fa4b66018139a4c5375a42ff42e8.tar.gz
trackermap-server-aff998db51d9fa4b66018139a4c5375a42ff42e8.tar.bz2
trackermap-server-aff998db51d9fa4b66018139a4c5375a42ff42e8.zip
Merge pull request #2348 from Abyss777/ignore_odometer
Add parameter "report.ignoreOdometer"
Diffstat (limited to 'src/org/traccar/events')
-rw-r--r--src/org/traccar/events/OverspeedEventHandler.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/org/traccar/events/OverspeedEventHandler.java b/src/org/traccar/events/OverspeedEventHandler.java
index 302fa87cd..57f60d864 100644
--- a/src/org/traccar/events/OverspeedEventHandler.java
+++ b/src/org/traccar/events/OverspeedEventHandler.java
@@ -47,11 +47,8 @@ public class OverspeedEventHandler extends BaseEventHandler {
Collection<Event> events = new ArrayList<>();
double speed = position.getSpeed();
- double speedLimit = 0;
- String speedLimitAttribute = Context.getDeviceManager().lookupAttribute(device.getId(), ATTRIBUTE_SPEED_LIMIT);
- if (speedLimitAttribute != null) {
- speedLimit = Double.parseDouble(speedLimitAttribute);
- }
+ double speedLimit = Context.getDeviceManager()
+ .lookupServerDouble(device.getId(), ATTRIBUTE_SPEED_LIMIT, 0);
if (speedLimit == 0) {
return null;
}