Commit Graph

13 Commits

Author SHA1 Message Date
Patrick José Pereira 18d8f19801 AP_Logger: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Peter Barker 7d42f473fc AP_Logger: allow each backend to be compiled out 2021-01-08 12:48:55 +11:00
Peter Barker ef0b860a48 AP_Logger: remove Prep and NeedPrep functions
These were only being called directly after Init(), so just tacked them
onto the end of those functions.

The checks in NeedPrep turned out to be mostly redundant.
2021-01-06 18:25:21 +11:00
Andy Piper 779c2a9e5f AP_Logger: move logger IO to a separate thread 2021-01-02 22:30:08 +11:00
Andy Piper d036b57de3 AP_Logger: stop logs safely in the block logger and asynchronously where possible 2020-09-17 10:45:57 +10:00
Andy Piper ccb583d092 AP_Logger: make block logger conform to mavlink expectations of numbering
add support for log time to block logger
refactor rotation into backed. Don't start logs when erasing
correct log start logic
separate read and write points so that requesting log information does not corrupt the current log
when starting a new log stop logging first
clear the write buffer when starting a new log
insert utc time when requesting info for the current log
stop logging and request formats again when starting a new log
cope with erase happening while we are logging
keep pushing out startup messages even when format messages are done
don't log to the gcs in the io thread
don't start new logs in the io thread
don't validate logs while erasing
flush logs when stopping logging
account for page header when calculating logs sizes
don't return data when asked for more data than in the log
optimize locking and use separate semaphore to mediate ring buffer access
stop logging when the chip is full and send a notification
calculate logs sizes correctly even when they wrap
read log data correctly even when it wraps
add stats support to block logger
reset dropped when starting a new log
fail logging when the chip is full
refactor critical bufferspace checks
increase messagewriter budget to 250us and to 300us for FMT
2020-09-05 10:20:39 +10:00
murata f6595a41ae AP_Logger: Change the type of a method 2020-01-22 12:45:27 +11:00
Andrew Tridgell 71a0645a59 AP_Logger: make all semaphores recursive
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
2020-01-19 20:19:30 +11:00
Andy Piper d167dacfae AP_Logger: fix locking issues, uninitialized read and status message length
account for erased partial sectors when looking at wrapped logs
2020-01-14 10:25:42 +11:00
Andy Piper 54b6e7b264 AP_Logger: mavlink backend needs to be the last backend
be really careful to catch aborted erases
take care to protect shared structures in io thread
if flash corruption is detected try and recover whole files
overwrite format in erase to make sure erase happens
output useful messages at critical times
a block is 64k a sector is 4k, rename internal variables appropriately
cope with log wrapping when sending log listings over mavlink
2020-01-02 18:18:04 +11:00
Michel Pastor dec5b97275 AP_Logger: fix logging on 256Mbit flash chips 2019-10-05 16:25:22 +10:00
Peter Barker 146b0c69d6 AP_Logger: check return values from get_log_data 2019-04-19 13:34:42 +10:00
Andrew Tridgell e3c9f10e91 AP_Logger: revived block based logging 2019-01-21 21:57:21 +11:00