Plane: ensure 10% free space when initialising logging
This commit is contained in:
parent
60010e794e
commit
3c0355e9e2
@ -539,13 +539,15 @@ void Plane::log_init(void)
|
||||
if (!DataFlash.CardInserted()) {
|
||||
gcs_send_text_P(MAV_SEVERITY_WARNING, PSTR("No dataflash card inserted"));
|
||||
g.log_bitmask.set(0);
|
||||
} else if (DataFlash.NeedErase()) {
|
||||
gcs_send_text_P(MAV_SEVERITY_WARNING, PSTR("ERASING LOGS"));
|
||||
do_erase_logs();
|
||||
} else if (DataFlash.NeedPrep()) {
|
||||
gcs_send_text_P(MAV_SEVERITY_WARNING, PSTR("Preparing log system"));
|
||||
DataFlash.Prep();
|
||||
gcs_send_text_P(MAV_SEVERITY_WARNING, PSTR("Prepared log system"));
|
||||
for (uint8_t i=0; i<num_gcs; i++) {
|
||||
gcs[i].reset_cli_timeout();
|
||||
}
|
||||
}
|
||||
|
||||
arming.set_logging_available(DataFlash.CardInserted());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user