mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
Copter: ensure 10% free space when initialising logging
This commit is contained in:
parent
d6e380496c
commit
1103451d36
@ -811,10 +811,13 @@ void Copter::log_init(void)
|
||||
if (!DataFlash.CardInserted()) {
|
||||
gcs_send_text_P(MAV_SEVERITY_CRITICAL, PSTR("No dataflash inserted"));
|
||||
g.log_bitmask.set(0);
|
||||
} else if (DataFlash.NeedErase()) {
|
||||
gcs_send_text_P(MAV_SEVERITY_CRITICAL, PSTR("ERASING LOGS"));
|
||||
do_erase_logs();
|
||||
gcs[0].reset_cli_timeout();
|
||||
} else if (DataFlash.NeedPrep()) {
|
||||
gcs_send_text_P(MAV_SEVERITY_CRITICAL, PSTR("Preparing log system"));
|
||||
DataFlash.Prep();
|
||||
gcs_send_text_P(MAV_SEVERITY_CRITICAL, PSTR("Prepared log system"));
|
||||
for (uint8_t i=0; i<num_gcs; i++) {
|
||||
gcs[i].reset_cli_timeout();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user