Copter: simplify dataflash initialisation
This commit is contained in:
parent
c1e07255b4
commit
019dd02569
@ -925,17 +925,11 @@ void Copter::start_logging()
|
||||
void Copter::log_init(void)
|
||||
{
|
||||
DataFlash.Init(log_structure, ARRAY_SIZE(log_structure));
|
||||
if (!DataFlash.CardInserted()) {
|
||||
gcs_send_text(MAV_SEVERITY_WARNING, "No dataflash card inserted");
|
||||
} else if (DataFlash.NeedPrep()) {
|
||||
gcs_send_text(MAV_SEVERITY_INFO, "Preparing log system");
|
||||
DataFlash.Prep();
|
||||
gcs_send_text(MAV_SEVERITY_INFO, "Prepared log system");
|
||||
|
||||
for (uint8_t i=0; i<num_gcs; i++) {
|
||||
gcs_chan[i].reset_cli_timeout();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else // LOGGING_ENABLED
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user