stanleyhuangyc / Freematics

Official source code repository for Freematics
https://freematics.com
425 stars 346 forks source link

restore missing timestamp #92

Closed AndreaBorgia-Abo closed 5 years ago

AndreaBorgia-Abo commented 5 years ago

The virtual setTimestamp method in the base FileLogger class already handles the timestamp nicely, so the fix for #91 is simply to remove the barebones implementation from the SDLogger class. Now the first record of each block is always "PID" 0 with the timestamp. Please consider merging, thanks.

AndreaBorgia-Abo commented 5 years ago

Please hold off pulling this: I have to recheck if the higher volume of log output is causing OBD PIDs to be skipped during the loop.

AndreaBorgia-Abo commented 5 years ago

Ok, go ahead, no problems with this PR. Turned out to be a timing issue: my car doesn't like too intense polling, apparently.... 250ms loop time works much better than the default 100ms.

stanleyhuangyc commented 5 years ago

SD data format is CSV based and includes a timestamp at first element for all lines.

AndreaBorgia-Abo commented 5 years ago

Perhaps in telelogger, not in datalogger (please see the linked bug report!) I have plenty of files that are just sequences of "pid,value"