diff --git a/controllers/ListenController.js b/controllers/ListenController.js index 4dd8fab..5adbd30 100644 --- a/controllers/ListenController.js +++ b/controllers/ListenController.js @@ -478,7 +478,7 @@ class ListenController { if (previousCrtD == timestamp_device) continue previousCrtD = timestamp_device - const lastTrack = (await GpsTracksModels.get2LastLocByDeviceId(logDevice.device_id))?.[0] + const lastTrack = (await GpsTracksModels.get2LastLocByDeviceId(imei))?.[0] const isSleepMode = rec.io["Sleep Mode"] == 0 ? false : true const isMoreThan1Min = lastTrack ? (timestamp_device - lastTrack.crt_d >= 60 ? true : false) : true if (!isMoreThan1Min && lastTrack.speed === 0 && rec.gnss.speed === 0) continue // avoid duplicate stationary log