dup data fix
This commit is contained in:
@ -473,7 +473,7 @@ class ListenController {
|
|||||||
let previousCrtD = 0
|
let previousCrtD = 0
|
||||||
for (const rec of records) {
|
for (const rec of records) {
|
||||||
// console.log("rec ====> ", rec)
|
// console.log("rec ====> ", rec)
|
||||||
const timestamp_device = rec.gnss.timestamp / 1000 - 25200
|
const timestamp_device = Math.floor(rec.gnss.timestamp / 1000) - 25200
|
||||||
// avoid duplicate timestamp
|
// avoid duplicate timestamp
|
||||||
if (previousCrtD == timestamp_device) continue
|
if (previousCrtD == timestamp_device) continue
|
||||||
previousCrtD = timestamp_device
|
previousCrtD = timestamp_device
|
||||||
@ -530,7 +530,7 @@ class ListenController {
|
|||||||
: rec.io["Fuel Consumed (counted)"] ?? 0,
|
: rec.io["Fuel Consumed (counted)"] ?? 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
await commitMessage(now, logDevice)
|
// await commitMessage(now, logDevice)
|
||||||
}
|
}
|
||||||
|
|
||||||
// IO: {"Ignition":0,"Movement":1,"GSM Signal":5,"Sleep Mode":0,"GNSS Status":1,"Accelerator Pedal Position":0,"External Voltage":13087,"Battery Voltage":4100,"Fuel Level":144,"Engine RPM":0,"Engine Temperature":950,"Trip Odometer":48250,"Total Odometer":288320,"Total Mileage":125662000,"Fuel Consumed (counted)":229}
|
// IO: {"Ignition":0,"Movement":1,"GSM Signal":5,"Sleep Mode":0,"GNSS Status":1,"Accelerator Pedal Position":0,"External Voltage":13087,"Battery Voltage":4100,"Fuel Level":144,"Engine RPM":0,"Engine Temperature":950,"Trip Odometer":48250,"Total Odometer":288320,"Total Mileage":125662000,"Fuel Consumed (counted)":229}
|
||||||
|
|||||||
Reference in New Issue
Block a user