Skip to content

Commit

Permalink
AP_Compass: added notify events (LEDs and buzzer) for learning
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Oct 23, 2018
1 parent 5fe9334 commit 70246cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/AP_Compass/Compass_learn.cpp
Expand Up @@ -79,6 +79,8 @@ void CompassLearn::update(void)
hal.scheduler->register_io_process(FUNCTOR_BIND_MEMBER(&CompassLearn::io_timer, void));
}

AP_Notify::flags.compass_cal_running = true;

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

0 comments on commit 70246cf

Please sign in to comment.