AP_Compass: added notify events (LEDs and buzzer) for learning

This commit is contained in:
Andrew Tridgell 2018-10-20 21:46:36 +11:00
parent 5fe9334a18
commit 70246cf954
1 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,8 @@ void CompassLearn::update(void)
hal.scheduler->register_io_process(FUNCTOR_BIND_MEMBER(&CompassLearn::io_timer, void)); hal.scheduler->register_io_process(FUNCTOR_BIND_MEMBER(&CompassLearn::io_timer, void));
} }
AP_Notify::flags.compass_cal_running = true;
if (sample_available) { if (sample_available) {
// last sample still being processed by IO thread // last sample still being processed by IO thread
return; return;
@ -152,6 +154,8 @@ void CompassLearn::update(void)
best_yaw_deg = 0; best_yaw_deg = 0;
best_offsets.zero(); best_offsets.zero();
gcs().send_text(MAV_SEVERITY_INFO, "CompassLearn: finished"); gcs().send_text(MAV_SEVERITY_INFO, "CompassLearn: finished");
AP_Notify::flags.compass_cal_running = false;
AP_Notify::events.compass_cal_saved = true;
} }
} }
} }