diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index 69b1a0b62b..c19caa1af9 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -2089,7 +2089,7 @@ Commander::run() } else if (mission_result.warning) { /* the mission has a warning */ - tune_mission_fail(true); + tune_mission_warn(true); } else { /* the mission is valid */ diff --git a/src/modules/commander/commander_helper.cpp b/src/modules/commander/commander_helper.cpp index a16e4e23f6..d7744c7104 100644 --- a/src/modules/commander/commander_helper.cpp +++ b/src/modules/commander/commander_helper.cpp @@ -206,6 +206,16 @@ void tune_mission_ok(bool use_buzzer) blink_msg_end = hrt_absolute_time() + BLINK_MSG_TIME; rgbled_set_color_and_mode(led_control_s::COLOR_GREEN, led_control_s::MODE_BLINK_FAST); + if (use_buzzer) { + set_tune(tune_control_s::TUNE_ID_NOTIFY_POSITIVE); + } +} + +void tune_mission_warn(bool use_buzzer) +{ + blink_msg_end = hrt_absolute_time() + BLINK_MSG_TIME; + rgbled_set_color_and_mode(led_control_s::COLOR_YELLOW, led_control_s::MODE_BLINK_FAST); + if (use_buzzer) { set_tune(tune_control_s::TUNE_ID_NOTIFY_NEUTRAL); } diff --git a/src/modules/commander/commander_helper.h b/src/modules/commander/commander_helper.h index 73524d9464..8ff0922b66 100644 --- a/src/modules/commander/commander_helper.h +++ b/src/modules/commander/commander_helper.h @@ -64,6 +64,7 @@ void set_tune_override(int tune); void set_tune(int tune); void tune_home_set(bool use_buzzer); void tune_mission_ok(bool use_buzzer); +void tune_mission_warn(bool use_buzzer); void tune_mission_fail(bool use_buzzer); void tune_positive(bool use_buzzer); void tune_neutral(bool use_buzzer);