aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/reports/Trips.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-08-11 15:26:11 +0500
committerAbyss777 <abyss@fox5.ru>2017-08-11 15:26:11 +0500
commit26db3ccc2ed5d43a0e791a29d5cc4afca192e4b7 (patch)
tree18c8460f1f9bd4632086228dabfa4c3084d69db1 /src/org/traccar/reports/Trips.java
parent32a0fee0b092e488662ed29b7b7f1f303ae57e0f (diff)
downloadtrackermap-server-26db3ccc2ed5d43a0e791a29d5cc4afca192e4b7.tar.gz
trackermap-server-26db3ccc2ed5d43a0e791a29d5cc4afca192e4b7.tar.bz2
trackermap-server-26db3ccc2ed5d43a0e791a29d5cc4afca192e4b7.zip
Initialize tripsConfig ones in Context
Diffstat (limited to 'src/org/traccar/reports/Trips.java')
-rw-r--r--src/org/traccar/reports/Trips.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/org/traccar/reports/Trips.java b/src/org/traccar/reports/Trips.java
index 6b97507f4..a4dcf00f1 100644
--- a/src/org/traccar/reports/Trips.java
+++ b/src/org/traccar/reports/Trips.java
@@ -32,7 +32,6 @@ import org.traccar.model.Group;
import org.traccar.reports.model.BaseReport;
import org.traccar.reports.model.DeviceReport;
import org.traccar.reports.model.TripReport;
-import org.traccar.reports.model.TripsConfig;
public final class Trips {
@@ -42,13 +41,11 @@ public final class Trips {
private static Collection<TripReport> detectTrips(long deviceId, Date from, Date to) throws SQLException {
double speedThreshold = Context.getConfig().getDouble("event.motion.speedThreshold", 0.01);
- TripsConfig tripsConfig = ReportUtils.initTripsConfig();
-
boolean ignoreOdometer = Context.getDeviceManager()
.lookupAttributeBoolean(deviceId, "report.ignoreOdometer", false, true);
- Collection<? extends BaseReport> result = ReportUtils.detectTripsAndStops(tripsConfig,
- ignoreOdometer, speedThreshold,
+ Collection<? extends BaseReport> result = ReportUtils.detectTripsAndStops(
+ Context.getTripsConfig(), ignoreOdometer, speedThreshold,
Context.getDataManager().getPositions(deviceId, from, to), true);
return (Collection<TripReport>) result;