mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 07:53:43 +08:00
[OBC] Outback Challenge Safety Rule 2: Irreversible crash
This commit is contained in:
committed by
Felix Ruess
parent
7b3408cb43
commit
6c1b685aae
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user