diff --git a/sw/airborne/firmwares/fixedwing/main_fbw.c b/sw/airborne/firmwares/fixedwing/main_fbw.c index dc56a3ba22..a67478540d 100644 --- a/sw/airborne/firmwares/fixedwing/main_fbw.c +++ b/sw/airborne/firmwares/fixedwing/main_fbw.c @@ -160,6 +160,17 @@ void event_task_fbw( void) { #endif /**Else the buffer is filled even if the last receive was not correct */ } +#if OUTBACK_CHALLENGE_VERY_DANGEROUS_RULE_AP_CAN_FORCE_FAILSAFE +#warning DANGER DANGER DANGER DANGER: Outback Challenge Rule FORCE-CRASH-RULE: DANGER DANGER: AP is now capable to FORCE your FBW in failsafe mode EVEN IF RC IS NOT LOST: Consider the consequences. + + int crash = 0; + if (commands[COMMAND_FORCECRASH] >= 8000) + { + set_failsafe_mode(); + crash = 1; + } + +#endif #ifdef ACTUATORS if (fbw_new_actuators > 0) { @@ -176,6 +187,13 @@ void event_task_fbw( void) { SetActuatorsFromCommands(trimmed_commands); fbw_new_actuators = 0; + #if OUTBACK_CHALLENGE_VERY_DANGEROUS_RULE_AP_CAN_FORCE_FAILSAFE + if (crash == 1) + { + for (;;) {} + } + #endif + } #endif