diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-24 21:20:57 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-24 21:20:57 +1300 |
commit | b1b5e5ce805064229f0c22ee7e898efa32d22e1a (patch) | |
tree | c708c8f12342c33070d5f8ee0fe0a31034aa2664 /src/org/traccar/reports | |
parent | 3e1a25b54ab342bedc8d688bb6ccb3c2d6c60d0c (diff) | |
parent | 1424c2048346206f750bd68232ba6e2cbe1545e9 (diff) | |
download | trackermap-server-b1b5e5ce805064229f0c22ee7e898efa32d22e1a.tar.gz trackermap-server-b1b5e5ce805064229f0c22ee7e898efa32d22e1a.tar.bz2 trackermap-server-b1b5e5ce805064229f0c22ee7e898efa32d22e1a.zip |
Merge pull request #2596 from Abyss777/lookup_simplify
Combine lookupAttribute helpers
Diffstat (limited to 'src/org/traccar/reports')
-rw-r--r-- | src/org/traccar/reports/Summary.java | 2 | ||||
-rw-r--r-- | src/org/traccar/reports/Trips.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/reports/Summary.java b/src/org/traccar/reports/Summary.java index 4d6446017..cacb4d1d6 100644 --- a/src/org/traccar/reports/Summary.java +++ b/src/org/traccar/reports/Summary.java @@ -60,7 +60,7 @@ public final class Summary { result.setMaxSpeed(position.getSpeed()); } boolean ignoreOdometer = Context.getDeviceManager() - .lookupConfigBoolean(deviceId, "report.ignoreOdometer", false); + .lookupAttributeBoolean(deviceId, "report.ignoreOdometer", false, true); result.setDistance(ReportUtils.calculateDistance(firstPosition, previousPosition, !ignoreOdometer)); result.setAverageSpeed(speedSum / positions.size()); } diff --git a/src/org/traccar/reports/Trips.java b/src/org/traccar/reports/Trips.java index 1c2ba3fe3..d4e25f5e5 100644 --- a/src/org/traccar/reports/Trips.java +++ b/src/org/traccar/reports/Trips.java @@ -80,7 +80,7 @@ public final class Trips { trip.setEndAddress(endTrip.getAddress()); boolean ignoreOdometer = Context.getDeviceManager() - .lookupConfigBoolean(deviceId, "report.ignoreOdometer", false); + .lookupAttributeBoolean(deviceId, "report.ignoreOdometer", false, true); trip.setDistance(ReportUtils.calculateDistance(startTrip, endTrip, !ignoreOdometer)); trip.setDuration(tripDuration); trip.setAverageSpeed(speedSum / (endIndex - startIndex)); |