mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
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)
|
void Tracker::log_init(void)
|
||||||
{
|
{
|
||||||
DataFlash.Init(log_structure, ARRAY_SIZE(log_structure));
|
DataFlash.Init(log_structure, ARRAY_SIZE(log_structure));
|
||||||
if (!DataFlash.CardInserted()) {
|
|
||||||
gcs_send_text(MAV_SEVERITY_WARNING, "No dataflash card inserted");
|
for (uint8_t i=0; i<num_gcs; i++) {
|
||||||
} else if (DataFlash.NeedPrep()) {
|
gcs_chan[i].reset_cli_timeout();
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g.log_bitmask != 0) {
|
if (g.log_bitmask != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user