mirror of https://github.com/ArduPilot/ardupilot
Tracker: simplify dataflash initialisation
This commit is contained in:
parent
8c074c7b73
commit
c1e07255b4
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue