I am looking for advice about how best to stop an issue that I have noticed recently that when flashing devices with the latest software quite often the event log write to an SD card is getting interrupted and this is resulting in a corruption of the file which after restart means I have to delete the file and re-create it. Thus potentially I could lose events which is what the log was designed to prevent!
I am looking for a method to complete all SD card write commits before the flash starts and thus hopefully avoid file corruption and the need to junk the event log file.
I have seen this in the OTS Updates section of the photon documentation:
System.updatesPending() Indicates if there are OTA updates pending.Note: Currently this function does not do anything useful, since it only returns true once the OTA update is already about to kick in.
The explanation isn’t very encouraging as to its usefulness. Any ideas from the community?