aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-08-15 15:15:49 +0500
committerAbyss777 <abyss@fox5.ru>2017-08-15 15:15:49 +0500
commit60dea5494b10f52433166a8785edc12860679bc3 (patch)
tree949f8e181791599a6777cc0ec38551835f900638
parentf1ee1017d62ec0d1b6b1ca56c297537870f1d32b (diff)
downloadtraccar-server-60dea5494b10f52433166a8785edc12860679bc3.tar.gz
traccar-server-60dea5494b10f52433166a8785edc12860679bc3.tar.bz2
traccar-server-60dea5494b10f52433166a8785edc12860679bc3.zip
Remove greadyParking
-rw-r--r--src/org/traccar/Context.java1
-rw-r--r--src/org/traccar/reports/model/TripsConfig.java13
-rw-r--r--test/org/traccar/events/MotionEventHandlerTest.java4
-rw-r--r--test/org/traccar/reports/ReportUtilsTest.java12
4 files changed, 9 insertions, 21 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index a69b1786d..0d2a05b7a 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -255,7 +255,6 @@ public final class Context {
config.getLong("report.trip.minimalTripDistance", 500),
config.getLong("report.trip.minimalTripDuration", 300) * 1000,
config.getLong("report.trip.minimalParkingDuration", 300) * 1000,
- config.getBoolean("report.trip.greedyParking"),
config.getLong("report.trip.minimalNoDataDuration", 3600) * 1000);
}
diff --git a/src/org/traccar/reports/model/TripsConfig.java b/src/org/traccar/reports/model/TripsConfig.java
index 7067781d7..4898c1389 100644
--- a/src/org/traccar/reports/model/TripsConfig.java
+++ b/src/org/traccar/reports/model/TripsConfig.java
@@ -22,11 +22,10 @@ public class TripsConfig {
}
public TripsConfig(double minimalTripDistance, long minimalTripDuration,
- long minimalParkingDuration, boolean greedyParking, long minimalNoDataDuration) {
+ long minimalParkingDuration, long minimalNoDataDuration) {
this.minimalTripDistance = minimalTripDistance;
this.minimalTripDuration = minimalTripDuration;
this.minimalParkingDuration = minimalParkingDuration;
- this.greedyParking = greedyParking;
this.minimalNoDataDuration = minimalNoDataDuration;
}
@@ -60,16 +59,6 @@ public class TripsConfig {
this.minimalParkingDuration = minimalParkingDuration;
}
- private boolean greedyParking;
-
- public boolean getGreedyParking() {
- return greedyParking;
- }
-
- public void setGreedyParking(boolean greedyParking) {
- this.greedyParking = greedyParking;
- }
-
private long minimalNoDataDuration;
public long getMinimalNoDataDuration() {
diff --git a/test/org/traccar/events/MotionEventHandlerTest.java b/test/org/traccar/events/MotionEventHandlerTest.java
index 6b7b9daee..0543d86fe 100644
--- a/test/org/traccar/events/MotionEventHandlerTest.java
+++ b/test/org/traccar/events/MotionEventHandlerTest.java
@@ -29,7 +29,7 @@ public class MotionEventHandlerTest extends BaseTest {
@Test
public void testMotionWithPosition() throws Exception {
MotionEventHandler motionEventHandler = new MotionEventHandler(
- new TripsConfig(500, 300 * 1000, 300 * 1000, false, 0));
+ new TripsConfig(500, 300 * 1000, 300 * 1000, 0));
Position position = new Position();
position.setTime(date("2017-01-01 00:00:00"));
@@ -68,7 +68,7 @@ public class MotionEventHandlerTest extends BaseTest {
@Test
public void testMotionWithStatus() throws Exception {
MotionEventHandler motionEventHandler = new MotionEventHandler(
- new TripsConfig(500, 300 * 1000, 300 * 1000, false, 0));
+ new TripsConfig(500, 300 * 1000, 300 * 1000, 0));
Position position = new Position();
position.setTime(new Date(System.currentTimeMillis() - 360000));
diff --git a/test/org/traccar/reports/ReportUtilsTest.java b/test/org/traccar/reports/ReportUtilsTest.java
index 1b552baa3..14d8d87e0 100644
--- a/test/org/traccar/reports/ReportUtilsTest.java
+++ b/test/org/traccar/reports/ReportUtilsTest.java
@@ -79,7 +79,7 @@ public class ReportUtilsTest extends BaseTest {
position("2016-01-01 00:06:00.000", 0, 3000),
position("2016-01-01 00:07:00.000", 0, 3000));
- TripsConfig tripsConfig = new TripsConfig(500, 300000, 180000, false, 900000);
+ TripsConfig tripsConfig = new TripsConfig(500, 300000, 180000, 900000);
Collection<TripReport> trips = ReportUtils.detectTrips(data, tripsConfig, false, 0.01);
@@ -127,7 +127,7 @@ public class ReportUtilsTest extends BaseTest {
position("2016-01-01 00:04:00.000", 1, 0),
position("2016-01-01 00:05:00.000", 0, 0));
- TripsConfig tripsConfig = new TripsConfig(500, 300000, 200000, false, 900000);
+ TripsConfig tripsConfig = new TripsConfig(500, 300000, 200000, 900000);
Collection<StopReport> result = ReportUtils.detectStops(data, tripsConfig, false, 0.01);
@@ -153,7 +153,7 @@ public class ReportUtilsTest extends BaseTest {
position("2016-01-01 00:04:00.000", 1, 0),
position("2016-01-01 00:05:00.000", 2, 0));
- TripsConfig tripsConfig = new TripsConfig(500, 300000, 200000, false, 900000);
+ TripsConfig tripsConfig = new TripsConfig(500, 300000, 200000, 900000);
Collection<StopReport> result = ReportUtils.detectStops(data, tripsConfig, false, 0.01);
@@ -179,7 +179,7 @@ public class ReportUtilsTest extends BaseTest {
position("2016-01-01 00:04:00.000", 0, 0),
position("2016-01-01 00:05:00.000", 0, 0));
- TripsConfig tripsConfig = new TripsConfig(500, 300000, 200000, false, 900000);
+ TripsConfig tripsConfig = new TripsConfig(500, 300000, 200000, 900000);
Collection<StopReport> result = ReportUtils.detectStops(data, tripsConfig, false, 0.01);
@@ -205,7 +205,7 @@ public class ReportUtilsTest extends BaseTest {
position("2016-01-01 00:04:00.000", 5, 0),
position("2016-01-01 00:05:00.000", 5, 0));
- TripsConfig tripsConfig = new TripsConfig(500, 300000, 200000, false, 900000);
+ TripsConfig tripsConfig = new TripsConfig(500, 300000, 200000, 900000);
Collection<StopReport> result = ReportUtils.detectStops(data, tripsConfig, false, 0.01);
@@ -227,7 +227,7 @@ public class ReportUtilsTest extends BaseTest {
position("2016-01-01 00:24:00.000", 5, 800),
position("2016-01-01 00:25:00.000", 5, 900));
- TripsConfig tripsConfig = new TripsConfig(500, 200000, 200000, false, 900000);
+ TripsConfig tripsConfig = new TripsConfig(500, 200000, 200000, 900000);
Collection<TripReport> trips = ReportUtils.detectTrips(data, tripsConfig, false, 0.01);