mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-07 00:53:41 +08:00
British Safety Rules: Failsafe on RC loss in all cases
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
<configure name="ACTUATORS_SPEKTRUM_DEV2" value="UART6"/>
|
||||
</subsystem>
|
||||
<define name="RC_LOST_FBW_MODE" value="FBW_MODE_FAILSAFE"/><!-- Switch to Failsafe or to Autopilot on RC loss? -->
|
||||
<define name="RC_LOST_IN_AUTO_FBW_MODE" value="FBW_MODE_FAILSAFE"/><!-- Switch to Failsafe with a working autopilot on RC loss? -->
|
||||
<define name="AP_LOST_FBW_MODE" value="FBW_MODE_MANUAL"/><!-- Switch to Failsafe or to Manual on AP loss? -->
|
||||
|
||||
<subsystem name="intermcu" type="uart">
|
||||
|
||||
@@ -159,7 +159,13 @@ STATIC_INLINE void main_periodic(void)
|
||||
if (fbw_mode == FBW_MODE_MANUAL) {
|
||||
fbw_mode = RC_LOST_FBW_MODE;
|
||||
} else {
|
||||
// No change: failsafe stays failsafe, auto stays auto
|
||||
if (fbw_mode == FBW_MODE_FAILSAFE)
|
||||
{
|
||||
// No change: failsafe stays failsafe
|
||||
} else {
|
||||
// Lost RC while in working Auto mode
|
||||
fbw_mode = RC_LOST_IN_AUTO_FBW_MODE;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // rc_is_good
|
||||
|
||||
@@ -47,11 +47,18 @@
|
||||
#define RC_LOST_FBW_MODE FBW_MODE_FAILSAFE
|
||||
#endif
|
||||
|
||||
/** mode to enter when AP is lost while using autopilot */
|
||||
#ifndef RC_LOST_IN_AUTO_FBW_MODE
|
||||
#define RC_LOST_IN_AUTO_FBW_MODE FBW_MODE_AUTO
|
||||
#endif
|
||||
|
||||
/** mode to enter when AP is lost while using autopilot */
|
||||
#ifndef AP_LOST_FBW_MODE
|
||||
#define AP_LOST_FBW_MODE FBW_MODE_FAILSAFE
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/** Switching between FBW and autopilot is done with RADIO_FBW_MODE: default is to re-use RADIO_MODE */
|
||||
|
||||
#ifndef RADIO_FBW_MODE
|
||||
|
||||
Reference in New Issue
Block a user