mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-26 18:20:34 +08:00
Rename force_failsafe to termination for clarity
This commit is contained in:
committed by
Alex Klimaj
parent
34dacffc4a
commit
7fe78e184e
@@ -94,7 +94,7 @@ static constexpr bool operator ==(const actuator_armed_s &a, const actuator_arme
|
||||
a.ready_to_arm == b.ready_to_arm &&
|
||||
a.lockdown == b.lockdown &&
|
||||
a.manual_lockdown == b.manual_lockdown &&
|
||||
a.force_failsafe == b.force_failsafe &&
|
||||
a.termination == b.termination &&
|
||||
a.in_esc_calibration_mode == b.in_esc_calibration_mode);
|
||||
}
|
||||
static_assert(sizeof(actuator_armed_s) == 16, "actuator_armed equality operator review");
|
||||
@@ -1898,11 +1898,11 @@ void Commander::run()
|
||||
_actuator_armed.lockdown = ((_vehicle_status.hil_state == vehicle_status_s::HIL_STATE_ON)
|
||||
|| _multicopter_throw_launch.isThrowLaunchInProgress());
|
||||
// _actuator_armed.manual_lockdown // action_request_s::ACTION_KILL
|
||||
_actuator_armed.force_failsafe = (_vehicle_status.nav_state == _vehicle_status.NAVIGATION_STATE_TERMINATION);
|
||||
_actuator_armed.termination = (_vehicle_status.nav_state == _vehicle_status.NAVIGATION_STATE_TERMINATION);
|
||||
// _actuator_armed.in_esc_calibration_mode // VEHICLE_CMD_PREFLIGHT_CALIBRATION
|
||||
|
||||
// if force_failsafe activated send parachute command
|
||||
if (!actuator_armed_prev.force_failsafe && _actuator_armed.force_failsafe && isArmed()) {
|
||||
// Send parachute command upon termination
|
||||
if (!actuator_armed_prev.termination && _actuator_armed.termination && isArmed()) {
|
||||
send_parachute_command();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ void SystemChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
actuator_armed_s actuator_armed;
|
||||
|
||||
if (_actuator_armed_sub.copy(&actuator_armed)) {
|
||||
if (actuator_armed.force_failsafe || actuator_armed.manual_lockdown) {
|
||||
if (actuator_armed.termination || actuator_armed.manual_lockdown) {
|
||||
/* EVENT
|
||||
*/
|
||||
reporter.armingCheckFailure(NavModes::All, health_component_t::system, events::ID("check_system_flight_term_active"),
|
||||
|
||||
@@ -119,9 +119,9 @@ private:
|
||||
}
|
||||
|
||||
// system_status overrides
|
||||
if (actuator_armed.force_failsafe || (actuator_armed.lockdown
|
||||
&& vehicle_status.hil_state == vehicle_status_s::HIL_STATE_OFF) || actuator_armed.manual_lockdown
|
||||
|| vehicle_status.nav_state == vehicle_status_s::NAVIGATION_STATE_TERMINATION) {
|
||||
if (actuator_armed.termination
|
||||
|| (actuator_armed.lockdown && vehicle_status.hil_state == vehicle_status_s::HIL_STATE_OFF)
|
||||
|| actuator_armed.manual_lockdown) {
|
||||
|
||||
system_status = MAV_STATE_FLIGHT_TERMINATION;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user