Tracker: simplify dataflash initialisation

This commit is contained in:
Peter Barker 2017-06-12 23:04:05 +10:00 committed by Francisco Ferreira
parent 8c074c7b73
commit c1e07255b4
1 changed files with 3 additions and 9 deletions

View File

@ -95,15 +95,9 @@ void Tracker::start_logging()
void Tracker::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();
}
for (uint8_t i=0; i<num_gcs; i++) {
gcs_chan[i].reset_cli_timeout();
}
if (g.log_bitmask != 0) {