The logging code found its own books out of order
What ArduPilot says:
- Internal errors 0x1 (logger_mapfailure)
- Internal errors 0x2 (logger_missing_logstructure)
- Internal errors 0x4 (logger_logwrite_missingfmt)
- Internal errors 0x8 (logger_too_many_deletions)
- Internal errors 0x10 (logger_bad_getfilename)
- Internal errors 0x40 (logger_flushing_without_sem)
Also explained here: 3 more
- Internal errors 0x80 (logger_bad_current_block)
- Internal errors 0x100 (logger_blockcount_mismatch)
- Internal errors 0x200 (logger_dequeue_failure)
These are the logger's self-checks; the flight code is not affected, but the log may be incomplete. mapfailure: a log message could not be given a number, because too many different messages are in use or one name is used with two layouts. miss_struct and write_mssfmt: a message was written whose format was never declared. many_deletes and bad_getfile: clearing old logs to free space on the card went wrong. bad_curr_blk, blkcnt_bad and dq_failure belong to logging over MAVLink. flush_no_sem exists only in the simulator.
What to do, most likely first
A Lua script writes its own log messages under too many names, or changes a message's fields between calls.
CheckThe error goes away with the scripts removed.
FixCorrect the script: one name, one fixed set of fields.
many_deletes: the card holds a broken sequence of log files that cannot be cleared.
CheckLook in APM/LOGS on a computer: missing numbers, files of size zero, more files than
LOG_MAX_FILES.FixCopy what you need and format the card.
The MAVLink ones: the program receiving the log stream lost step with the flight controller.
FixRestart the receiving program; for everyday use log to the card or flash chip instead (
LOG_BACKEND_TYPE1 or 4).
Parameters to look at
| Parameter | What it is |
|---|---|
LOG_BACKEND_TYPE | AP_Logger Backend Storage type |
LOG_MAX_FILES | Maximum number of log files |
LOG_FILE_MB_FREE | Old logs on the SD card will be deleted to maintain this amount of free space |
Where to do it:Setup & Tuning GuideLua Applet Catalog