ihedvall / mdflib

Implementation of the ASAM MDF data file.
https://ihedvall.github.io/mdflib/
MIT License
57 stars 25 forks source link

Save channel group headers right after saving data #91

Closed tiagoporsch closed 1 week ago

tiagoporsch commented 1 week ago

If the program generating the MDF file was interrupted to never recover again, the current measurement would be completely lost, even though data was being periodically written to the file.

The problem was that the channel group header was not being written to the file to reflect the updated number of samples.

This function appears to be called sporadically enough that these writes shouldn't be a problem.