and remove the px4_ prefix, except for px4_config.h.
command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done
Transitional headers for submodules are added (px4_{defines,log,time}.h)
- fsync can be a long blocking operation, so we need to make sure the main
logger thread does not block during this time, when it tries to aquire
the mutex
- fixes calling fsync on an invalid file descriptor
In case a log ends abruptly, we will know that we have everything up to the
last second.
A test showed that CPU load and the amount of logging drops are unaffected
by this.
Test flights reported the warning `[load_mon] log_writer_file low on stack! (292 bytes left)`
Increase stack size from 1060 to 1072 (=8 + 1060 rounded to next multiple of 8).
This enables to use the RAM normally consumed by the log buffer to be used for calibration and other memory-intense tasks.
These run typically only disarmed when logging is not enabled.