fix
This commit is contained in:
@ -478,7 +478,7 @@ class ListenController {
|
|||||||
if (previousCrtD == timestamp_device) continue
|
if (previousCrtD == timestamp_device) continue
|
||||||
previousCrtD = timestamp_device
|
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 isSleepMode = rec.io["Sleep Mode"] == 0 ? false : true
|
||||||
const isMoreThan1Min = lastTrack ? (timestamp_device - lastTrack.crt_d >= 60 ? true : 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
|
if (!isMoreThan1Min && lastTrack.speed === 0 && rec.gnss.speed === 0) continue // avoid duplicate stationary log
|
||||||
|
|||||||
Reference in New Issue
Block a user