forked from Archive/PX4-Autopilot
commander: neutral beep on mission with warning
When a mission is uploaded we should beep consistenly: - valid -> positive - warn -> neutral - invalid -> negative Before this, it was: - valid -> positive - warn -> negative - invalid -> negative
This commit is contained in:
parent
b7890529b2
commit
4ccc60e2b0
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue