diff --git a/boards/modalai/voxl2-slpi/src/drivers/dsp_sbus/protocol.h b/boards/modalai/voxl2-slpi/src/drivers/dsp_sbus/protocol.h index 3cfcee2d12..7762b9659a 100644 --- a/boards/modalai/voxl2-slpi/src/drivers/dsp_sbus/protocol.h +++ b/boards/modalai/voxl2-slpi/src/drivers/dsp_sbus/protocol.h @@ -189,7 +189,7 @@ #define PX4IO_P_SETUP_ARMING_ALWAYS_PWM_ENABLE (1 << 6) /* Output of PWM right after startup enabled to help ESCs initialize and prevent them from beeping */ #define PX4IO_P_SETUP_ARMING_RC_HANDLING_DISABLED (1 << 7) /* Disable the IO-internal evaluation of the RC */ #define PX4IO_P_SETUP_ARMING_LOCKDOWN (1 << 8) /* If set, the system operates normally, but won't actuate any servos */ -#define PX4IO_P_SETUP_ARMING_FORCE_FAILSAFE (1 << 9) /* If set, the system will always output the failsafe values */ +#define PX4IO_P_SETUP_ARMING_TERMINATION (1 << 9) /* If set, the system will always output the failsafe values */ #define PX4IO_P_SETUP_ARMING_TERMINATION_FAILSAFE (1 << 10) /* If set, the system will never return from a failsafe, but remain in failsafe once triggered. */ #define PX4IO_P_SETUP_ARMING_OVERRIDE_IMMEDIATE (1 << 11) /* If set then on FMU failure override is immediate. Othewise it waits for the mode switch to go past the override thrshold */ diff --git a/boards/modalai/voxl2/src/drivers/apps_sbus/protocol.h b/boards/modalai/voxl2/src/drivers/apps_sbus/protocol.h index 3cfcee2d12..7762b9659a 100644 --- a/boards/modalai/voxl2/src/drivers/apps_sbus/protocol.h +++ b/boards/modalai/voxl2/src/drivers/apps_sbus/protocol.h @@ -189,7 +189,7 @@ #define PX4IO_P_SETUP_ARMING_ALWAYS_PWM_ENABLE (1 << 6) /* Output of PWM right after startup enabled to help ESCs initialize and prevent them from beeping */ #define PX4IO_P_SETUP_ARMING_RC_HANDLING_DISABLED (1 << 7) /* Disable the IO-internal evaluation of the RC */ #define PX4IO_P_SETUP_ARMING_LOCKDOWN (1 << 8) /* If set, the system operates normally, but won't actuate any servos */ -#define PX4IO_P_SETUP_ARMING_FORCE_FAILSAFE (1 << 9) /* If set, the system will always output the failsafe values */ +#define PX4IO_P_SETUP_ARMING_TERMINATION (1 << 9) /* If set, the system will always output the failsafe values */ #define PX4IO_P_SETUP_ARMING_TERMINATION_FAILSAFE (1 << 10) /* If set, the system will never return from a failsafe, but remain in failsafe once triggered. */ #define PX4IO_P_SETUP_ARMING_OVERRIDE_IMMEDIATE (1 << 11) /* If set then on FMU failure override is immediate. Othewise it waits for the mode switch to go past the override thrshold */ diff --git a/msg/Px4ioStatus.msg b/msg/Px4ioStatus.msg index 295c8fba66..329c14f523 100644 --- a/msg/Px4ioStatus.msg +++ b/msg/Px4ioStatus.msg @@ -29,7 +29,7 @@ bool alarm_rc_lost bool arming_failsafe_custom bool arming_fmu_armed bool arming_fmu_prearmed -bool arming_force_failsafe +bool arming_terminated bool arming_io_arm_ok bool arming_lockdown bool arming_termination_failsafe diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 1926c84351..681e293bc4 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -801,10 +801,10 @@ PX4IO::io_set_arming_state() } if (armed.termination) { - set |= PX4IO_P_SETUP_ARMING_FORCE_FAILSAFE; + set |= PX4IO_P_SETUP_ARMING_TERMINATION; } else { - clear |= PX4IO_P_SETUP_ARMING_FORCE_FAILSAFE; + clear |= PX4IO_P_SETUP_ARMING_TERMINATION; } if (armed.ready_to_arm) { @@ -988,7 +988,7 @@ int PX4IO::io_get_status() status.arming_fmu_prearmed = SETUP_ARMING & PX4IO_P_SETUP_ARMING_FMU_PREARMED; status.arming_failsafe_custom = SETUP_ARMING & PX4IO_P_SETUP_ARMING_FAILSAFE_CUSTOM; status.arming_lockdown = SETUP_ARMING & PX4IO_P_SETUP_ARMING_LOCKDOWN; - status.arming_force_failsafe = SETUP_ARMING & PX4IO_P_SETUP_ARMING_FORCE_FAILSAFE; + status.arming_terminated = SETUP_ARMING & PX4IO_P_SETUP_ARMING_TERMINATION; status.arming_termination_failsafe = SETUP_ARMING & PX4IO_P_SETUP_ARMING_TERMINATION_FAILSAFE; for (unsigned i = 0; i < _max_actuators; i++) { diff --git a/src/modules/px4iofirmware/mixer.cpp b/src/modules/px4iofirmware/mixer.cpp index 936c126505..6a87757f54 100644 --- a/src/modules/px4iofirmware/mixer.cpp +++ b/src/modules/px4iofirmware/mixer.cpp @@ -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; } diff --git a/src/modules/px4iofirmware/protocol.h b/src/modules/px4iofirmware/protocol.h index a0389d78b4..effca63a7c 100644 --- a/src/modules/px4iofirmware/protocol.h +++ b/src/modules/px4iofirmware/protocol.h @@ -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 */ diff --git a/src/modules/px4iofirmware/registers.c b/src/modules/px4iofirmware/registers.c index a191577ef3..0791345a54 100644 --- a/src/modules/px4iofirmware/registers.c +++ b/src/modules/px4iofirmware/registers.c @@ -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;