AP_Notify: ChibiOS: beep on mode change

This commit is contained in:
Peter Barker 2018-04-16 14:06:27 +10:00 committed by Andrew Tridgell
parent 557f8cee43
commit 9480572075
1 changed files with 9 additions and 0 deletions

View File

@ -79,6 +79,15 @@ void ToneAlarm_ChibiOS::update()
}
}
// notify the user when their mode change was successful
if (AP_Notify::events.user_mode_change) {
if (AP_Notify::flags.armed) {
play_tune(TONE_NOTIFY_MODE_CHANGE_LOUD);
} else {
play_tune(TONE_NOTIFY_MODE_CHANGE_SOFT);
}
}
// check if battery status has changed
if (flags.failsafe_battery != AP_Notify::flags.failsafe_battery) {
flags.failsafe_battery = AP_Notify::flags.failsafe_battery;