aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/events/OverspeedEventHandler.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-07-28 11:42:10 +0500
committerAbyss777 <abyss@fox5.ru>2016-07-28 11:42:10 +0500
commitf7e82c4d9a66b8ab1ba90d4cae690f9c798d03a7 (patch)
treed7629335bf8cc14ca4531f198713b4c69b53e6a7 /src/org/traccar/events/OverspeedEventHandler.java
parentb00b35b33095110cef46c8a255686cad87ac7150 (diff)
downloadtrackermap-server-f7e82c4d9a66b8ab1ba90d4cae690f9c798d03a7.tar.gz
trackermap-server-f7e82c4d9a66b8ab1ba90d4cae690f9c798d03a7.tar.bz2
trackermap-server-f7e82c4d9a66b8ab1ba90d4cae690f9c798d03a7.zip
Removed suppressing repeated events during analyzing.
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;
}