Implement RC and DL failsafe action handling for multirotors

Move RC and DL failsafe actions handling from navigator to commander (credits to @AndreasAntener)
Separate manual kill switch handling via manual_lockdown to prevent override and release of software lockdown by RC switch

Other changes:
Add failsafe tune
Fix LED blinking for Pixracer
Return back support for rc inputs in simulator but now it is configurable via cmake
This commit is contained in:
Anton Matosov
2016-12-15 10:38:59 -08:00
committed by Lorenz Meier
parent 964dabe179
commit 3a17c07b1e
21 changed files with 579 additions and 211 deletions

View File

@@ -243,6 +243,17 @@ void tune_negative(bool use_buzzer)
}
}
void tune_failsafe(bool use_buzzer)
{
blink_msg_end = hrt_absolute_time() + BLINK_MSG_TIME;
rgbled_set_color(RGBLED_COLOR_PURPLE);
rgbled_set_mode(RGBLED_MODE_BLINK_FAST);
if (use_buzzer) {
set_tune(TONE_BATTERY_WARNING_FAST_TUNE);
}
}
int blink_msg_state()
{
if (blink_msg_end == 0) {