mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 02:23:34 +08:00
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:
@@ -2089,7 +2089,7 @@ Commander::run()
|
|||||||
|
|
||||||
} else if (mission_result.warning) {
|
} else if (mission_result.warning) {
|
||||||
/* the mission has a warning */
|
/* the mission has a warning */
|
||||||
tune_mission_fail(true);
|
tune_mission_warn(true);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* the mission is valid */
|
/* the mission is valid */
|
||||||
|
|||||||
@@ -206,6 +206,16 @@ void tune_mission_ok(bool use_buzzer)
|
|||||||
blink_msg_end = hrt_absolute_time() + BLINK_MSG_TIME;
|
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);
|
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) {
|
if (use_buzzer) {
|
||||||
set_tune(tune_control_s::TUNE_ID_NOTIFY_NEUTRAL);
|
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 set_tune(int tune);
|
||||||
void tune_home_set(bool use_buzzer);
|
void tune_home_set(bool use_buzzer);
|
||||||
void tune_mission_ok(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_mission_fail(bool use_buzzer);
|
||||||
void tune_positive(bool use_buzzer);
|
void tune_positive(bool use_buzzer);
|
||||||
void tune_neutral(bool use_buzzer);
|
void tune_neutral(bool use_buzzer);
|
||||||
|
|||||||
Reference in New Issue
Block a user