aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/handler/events/OverspeedEventHandler.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/handler/events/OverspeedEventHandler.java b/src/main/java/org/traccar/handler/events/OverspeedEventHandler.java
index e534df9de..c396b28e9 100644
--- a/src/main/java/org/traccar/handler/events/OverspeedEventHandler.java
+++ b/src/main/java/org/traccar/handler/events/OverspeedEventHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 - 2019 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2020 Anton Tananaev (anton@traccar.org)
* Copyright 2018 Andrey Kunitsyn (andrey@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -122,6 +122,11 @@ public class OverspeedEventHandler extends BaseEventHandler {
double speedLimit = deviceManager.lookupAttributeDouble(deviceId, ATTRIBUTE_SPEED_LIMIT, 0, true, false);
+ double positionSpeedLimit = position.getDouble(Position.KEY_SPEED_LIMIT);
+ if (positionSpeedLimit > 0) {
+ speedLimit = positionSpeedLimit;
+ }
+
double geofenceSpeedLimit = 0;
long overspeedGeofenceId = 0;