aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-08-29 10:10:15 +0500
committerAbyss777 <abyss@fox5.ru>2017-08-29 10:10:15 +0500
commite1925a35ce309a3cf99c47c8cea599cd53d22b5c (patch)
tree37397c2534830ecb45db12dadb8bf8f734d4d061 /src
parent19d4f15ac891e1a684be456d544ef32d6b276dcd (diff)
downloadtraccar-server-e1925a35ce309a3cf99c47c8cea599cd53d22b5c.tar.gz
traccar-server-e1925a35ce309a3cf99c47c8cea599cd53d22b5c.tar.bz2
traccar-server-e1925a35ce309a3cf99c47c8cea599cd53d22b5c.zip
Rename variables and parameters to skip filtering
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/FilterHandler.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/org/traccar/FilterHandler.java b/src/org/traccar/FilterHandler.java
index 08be43f65..f63fd17dd 100644
--- a/src/org/traccar/FilterHandler.java
+++ b/src/org/traccar/FilterHandler.java
@@ -29,8 +29,8 @@ public class FilterHandler extends BaseDataHandler {
private boolean filterStatic;
private int filterDistance;
private int filterMaxSpeed;
- private long filterLimit;
- private boolean keepAlarms;
+ private long skipLimit;
+ private boolean skipAlarms;
public void setFilterInvalid(boolean filterInvalid) {
this.filterInvalid = filterInvalid;
@@ -64,12 +64,12 @@ public class FilterHandler extends BaseDataHandler {
this.filterMaxSpeed = filterMaxSpeed;
}
- public void setFilterLimit(long filterLimit) {
- this.filterLimit = filterLimit;
+ public void setSkipLimit(long skipLimit) {
+ this.skipLimit = skipLimit;
}
- public void setKeepAlarms(boolean keepAlarms) {
- this.keepAlarms = keepAlarms;
+ public void setSkipAlarms(boolean skipAlarms) {
+ this.skipAlarms = skipAlarms;
}
public FilterHandler() {
@@ -83,8 +83,8 @@ public class FilterHandler extends BaseDataHandler {
filterStatic = config.getBoolean("filter.static");
filterDistance = config.getInteger("filter.distance");
filterMaxSpeed = config.getInteger("filter.maxSpeed");
- filterLimit = config.getLong("filter.limit") * 1000;
- keepAlarms = config.getBoolean("filter.keepAlarms");
+ skipLimit = config.getLong("filter.skipLimit") * 1000;
+ skipAlarms = config.getBoolean("filter.skipAlarms");
}
}
@@ -139,14 +139,14 @@ public class FilterHandler extends BaseDataHandler {
}
private boolean skipLimit(Position position, Position last) {
- if (filterLimit != 0 && last != null) {
- return (position.getFixTime().getTime() - last.getFixTime().getTime()) > filterLimit;
+ if (skipLimit != 0 && last != null) {
+ return (position.getFixTime().getTime() - last.getFixTime().getTime()) > skipLimit;
}
return false;
}
private boolean skipAlarms(Position position) {
- return keepAlarms && position.getAttributes().containsKey(Position.KEY_ALARM);
+ return skipAlarms && position.getAttributes().containsKey(Position.KEY_ALARM);
}
private boolean filter(Position position) {