mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 09:58:28 -04:00
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()) {
|
if (!DataFlash.CardInserted()) {
|
||||||
gcs_send_text_P(MAV_SEVERITY_WARNING, PSTR("No dataflash card inserted"));
|
gcs_send_text_P(MAV_SEVERITY_WARNING, PSTR("No dataflash card inserted"));
|
||||||
g.log_bitmask.set(0);
|
g.log_bitmask.set(0);
|
||||||
} else if (DataFlash.NeedErase()) {
|
} else if (DataFlash.NeedPrep()) {
|
||||||
gcs_send_text_P(MAV_SEVERITY_WARNING, PSTR("ERASING LOGS"));
|
gcs_send_text_P(MAV_SEVERITY_WARNING, PSTR("Preparing log system"));
|
||||||
do_erase_logs();
|
DataFlash.Prep();
|
||||||
|
gcs_send_text_P(MAV_SEVERITY_WARNING, PSTR("Prepared log system"));
|
||||||
for (uint8_t i=0; i<num_gcs; i++) {
|
for (uint8_t i=0; i<num_gcs; i++) {
|
||||||
gcs[i].reset_cli_timeout();
|
gcs[i].reset_cli_timeout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
arming.set_logging_available(DataFlash.CardInserted());
|
arming.set_logging_available(DataFlash.CardInserted());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user