fleetmap-reports 1.0.311 → 1.0.312
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/speeding-report.js +3 -3
package/package.json
CHANGED
package/src/speeding-report.js
CHANGED
|
@@ -107,7 +107,7 @@ async function createSpeedingReportByDriver(from, to, userData) {
|
|
|
107
107
|
const routes = await traccarHelper.getRoute(traccarInstance, from, to, devices)
|
|
108
108
|
const events = []
|
|
109
109
|
if(!userData.useVehicleSpeedLimit && userData.customSpeed){
|
|
110
|
-
events.push(...await getCustomSpeedLimitEvents(devices, routes))
|
|
110
|
+
events.push(...await getCustomSpeedLimitEvents(devices, routes, userData.customSpeed))
|
|
111
111
|
} else {
|
|
112
112
|
events.push(...await traccarHelper.getEvents(traccarInstance, from, to, devices, eventTypes))
|
|
113
113
|
}
|
|
@@ -198,10 +198,10 @@ async function findEventsPosition(from, to, devices, events, routes, userData){
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
async function getCustomSpeedLimitEvents(devices, routes,
|
|
201
|
+
async function getCustomSpeedLimitEvents(devices, routes, customSpeed){
|
|
202
202
|
console.log('custom speed limit events')
|
|
203
203
|
const events = []
|
|
204
|
-
const maxSpeed =
|
|
204
|
+
const maxSpeed = customSpeed / 1.85200
|
|
205
205
|
|
|
206
206
|
for (const d of devices) {
|
|
207
207
|
const positions = routes.filter(p => p.deviceId === d.id)
|