No log file could be opened at the moment of arming
What ArduPilot says:
- PreArm: Logging not started
Arming is the moment ArduPilot opens a new log. It asked the logger to start and waited up to 1 second; no log was open at the end of it, so it did not arm. The other arming checks had passed: this is the last one.
What to do, most likely first
There is no SD card, or it cannot be written.
CheckFor about 5 seconds after the failed attempt the pre-arm checks also show “Logging failed”.
FixInsert a good card formatted as FAT32 and reboot.
The card is full of other files, or so slow that opening a file takes more than a second.
CheckA second try a few seconds later arms normally.
FixFree the card or use a faster one. ArduPilot deletes its own oldest logs to keep
LOG_FILE_MB_FREEmegabytes free, but not other files.
Parameters to look at
| Parameter | What it is |
|---|---|
LOG_BACKEND_TYPE | AP_Logger Backend Storage type |
LOG_DISARMED | Enable logging while disarmed |
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 Guide
The code that sends it
PreArm: Logging not started
libraries/AP_Arming/AP_Arming.cpp AP_Arming::arm_checks() · Open in ArduPilot Copter-4.7.1