diff --git a/libraries/AP_Notify/AP_Notify.h b/libraries/AP_Notify/AP_Notify.h index f13a69164f..91038453dc 100644 --- a/libraries/AP_Notify/AP_Notify.h +++ b/libraries/AP_Notify/AP_Notify.h @@ -79,7 +79,7 @@ public: uint8_t mission_complete : 1; // 1 when the mission has completed successfully uint8_t waypoint_complete : 1; // 1 as vehicle completes a waypoint uint8_t user_mode_change_failed : 1; // 1 when user initiated flight mode change fails - uint8_t failsafe_action_taken : 1; // unused + uint8_t failsafe_mode_change : 1; // 1 when failsafe has triggered a flight mode change }; // the notify flags are static to allow direct class access diff --git a/libraries/AP_Notify/ToneAlarm_PX4.cpp b/libraries/AP_Notify/ToneAlarm_PX4.cpp index f034c94b09..76bb55698b 100644 --- a/libraries/AP_Notify/ToneAlarm_PX4.cpp +++ b/libraries/AP_Notify/ToneAlarm_PX4.cpp @@ -171,7 +171,8 @@ void ToneAlarm_PX4::update() flags.user_mode_initialized = 1; } - if(AP_Notify::events.failsafe_action_taken) { + // failsafe initiated mode change + if(AP_Notify::events.failsafe_mode_change) { play_tone(AP_NOTIFY_PX4_TONE_LOUD_ATTENTION_NEEDED); } @@ -187,7 +188,7 @@ void ToneAlarm_PX4::update() if (flags.failsafe_radio != AP_Notify::flags.failsafe_radio) { flags.failsafe_radio = AP_Notify::flags.failsafe_radio; if (flags.failsafe_radio) { - // armed case handled by events.failsafe_action_taken + // armed case handled by events.failsafe_mode_change if (!AP_Notify::flags.armed) { play_tone(AP_NOTIFY_PX4_TONE_QUIET_NEG_FEEDBACK); }