IO: rename FORCE_FAILSAFE to TERMINATION for clarity

This commit is contained in:
Matthias Grob
2025-07-25 16:48:22 +02:00
committed by Alex Klimaj
parent 7fe78e184e
commit 9d75bdbe62
7 changed files with 13 additions and 13 deletions
+3 -3
View File
@@ -156,13 +156,13 @@ mixer_tick()
(source == MIX_DISARMED) && /* and if we ended up not changing the default mixer */
should_arm && /* and we should be armed, so we intended to provide outputs */
(r_status_flags & PX4IO_P_STATUS_FLAGS_FMU_INITIALIZED)) { /* and FMU is initialized */
atomic_modify_or(&r_setup_arming, PX4IO_P_SETUP_ARMING_FORCE_FAILSAFE); /* then FMU is dead -> terminate flight */
atomic_modify_or(&r_setup_arming, PX4IO_P_SETUP_ARMING_TERMINATION); /* then FMU is dead -> terminate flight */
}
/*
* Check if we should force failsafe - and do it if we have to
* If terminated output failsafe values
*/
if (r_setup_arming & PX4IO_P_SETUP_ARMING_FORCE_FAILSAFE) {
if (r_setup_arming & PX4IO_P_SETUP_ARMING_TERMINATION) {
source = MIX_FAILSAFE;
}
+1 -1
View File
@@ -162,7 +162,7 @@
#define PX4IO_P_SETUP_ARMING_FMU_PREARMED (1 << 2) /* FMU is already prearmed */
#define PX4IO_P_SETUP_ARMING_FAILSAFE_CUSTOM (1 << 3) /* use custom failsafe values */
#define PX4IO_P_SETUP_ARMING_LOCKDOWN (1 << 4) /* If set, the system operates normally, but won't actuate any servos */
#define PX4IO_P_SETUP_ARMING_FORCE_FAILSAFE (1 << 5) /* If set, the system will always output the failsafe values */
#define PX4IO_P_SETUP_ARMING_TERMINATION (1 << 5) /* If set, the system will always output the failsafe values */
#define PX4IO_P_SETUP_ARMING_TERMINATION_FAILSAFE (1 << 6) /* If set, the system will never return from a failsafe, but remain in failsafe once triggered. */
#define PX4IO_P_SETUP_PWM_RATES 2 /* bitmask, 0 = low rate, 1 = high rate */
+3 -3
View File
@@ -153,7 +153,7 @@ volatile uint16_t r_page_setup[] = {
PX4IO_P_SETUP_ARMING_IO_ARM_OK | \
PX4IO_P_SETUP_ARMING_FAILSAFE_CUSTOM | \
PX4IO_P_SETUP_ARMING_LOCKDOWN | \
PX4IO_P_SETUP_ARMING_FORCE_FAILSAFE | \
PX4IO_P_SETUP_ARMING_TERMINATION | \
PX4IO_P_SETUP_ARMING_TERMINATION_FAILSAFE)
#define PX4IO_P_SETUP_RATES_VALID ((1 << PX4IO_SERVO_COUNT) - 1)
@@ -361,11 +361,11 @@ registers_set_one(uint8_t page, uint8_t offset, uint16_t value)
value |= (r_setup_arming & PX4IO_P_SETUP_ARMING_TERMINATION_FAILSAFE);
/*
* If failsafe termination is enabled and force failsafe bit is set, do not allow
* If failsafe termination is enabled and termination bit is set, do not allow
* the autopilot to clear it.
*/
if (r_setup_arming & PX4IO_P_SETUP_ARMING_TERMINATION_FAILSAFE) {
value |= (r_setup_arming & PX4IO_P_SETUP_ARMING_FORCE_FAILSAFE);
value |= (r_setup_arming & PX4IO_P_SETUP_ARMING_TERMINATION);
}
r_setup_arming = value;