aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/events/OverspeedEventHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/events/OverspeedEventHandler.java')
-rw-r--r--src/org/traccar/events/OverspeedEventHandler.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/org/traccar/events/OverspeedEventHandler.java b/src/org/traccar/events/OverspeedEventHandler.java
index b61277548..0328b9109 100644
--- a/src/org/traccar/events/OverspeedEventHandler.java
+++ b/src/org/traccar/events/OverspeedEventHandler.java
@@ -34,12 +34,10 @@ public class OverspeedEventHandler extends BaseEventHandler {
private boolean checkGroups;
private boolean riseOnce;
- private int suppressRepeated;
public OverspeedEventHandler() {
checkGroups = Context.getConfig().getBoolean("event.overspeed.groupsEnabled");
riseOnce = Context.getConfig().getBoolean("event.overspeed.riseOnce");
- suppressRepeated = Context.getConfig().getInteger("event.suppressRepeated", 60);
}
@Override
@@ -97,14 +95,7 @@ public class OverspeedEventHandler extends BaseEventHandler {
}
speedLimit = UnitsConverter.knotsFromKph(speedLimit);
if (speedLimit != 0 && speed > speedLimit && oldSpeed <= speedLimit) {
- try {
- if (Context.getDataManager().getLastEvents(
- position.getDeviceId(), Event.TYPE_DEVICE_OVERSPEED, suppressRepeated).isEmpty()) {
- events.add(new Event(Event.TYPE_DEVICE_OVERSPEED, position.getDeviceId(), position.getId()));
- }
- } catch (SQLException error) {
- Log.warning(error);
- }
+ events.add(new Event(Event.TYPE_DEVICE_OVERSPEED, position.getDeviceId(), position.getId()));
}
return events;
}