mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 01:13:34 +08:00
pre arm check: add circuit breaker for the VTOL arming in fixed-wing mode prevention
Added a new circuit breaker that, if set, enables arming in fixed-wing mode for VTOLs. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Lorenz Meier
parent
f4df3fb5f2
commit
4fa64f686a
@@ -134,7 +134,8 @@ bool PreFlightCheck::preArmCheck(orb_advert_t *mavlink_log_pub, const vehicle_st
|
||||
}
|
||||
}
|
||||
|
||||
if (status.is_vtol && status.vehicle_type != vehicle_status_s::VEHICLE_TYPE_ROTARY_WING) {
|
||||
if (!status_flags.circuit_breaker_vtol_fw_arming_check && status.is_vtol
|
||||
&& status.vehicle_type != vehicle_status_s::VEHICLE_TYPE_ROTARY_WING) {
|
||||
if (prearm_ok) {
|
||||
mavlink_log_critical(mavlink_log_pub, "Arming denied! Vehicle is not in multicopter mode");
|
||||
prearm_ok = false;
|
||||
|
||||
@@ -2340,6 +2340,8 @@ Commander::get_circuit_breaker_params()
|
||||
CBRK_FLIGHTTERM_KEY);
|
||||
status_flags.circuit_breaker_engaged_posfailure_check = circuit_breaker_enabled_by_val(_param_cbrk_velposerr.get(),
|
||||
CBRK_VELPOSERR_KEY);
|
||||
status_flags.circuit_breaker_vtol_fw_arming_check = circuit_breaker_enabled_by_val(_param_cbrk_vtolarming.get(),
|
||||
CBRK_VTOLARMING_KEY);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -243,6 +243,7 @@ private:
|
||||
(ParamInt<px4::params::CBRK_ENGINEFAIL>) _param_cbrk_enginefail,
|
||||
(ParamInt<px4::params::CBRK_FLIGHTTERM>) _param_cbrk_flightterm,
|
||||
(ParamInt<px4::params::CBRK_VELPOSERR>) _param_cbrk_velposerr,
|
||||
(ParamInt<px4::params::CBRK_VTOLARMING>) _param_cbrk_vtolarming,
|
||||
|
||||
// Geofrence
|
||||
(ParamInt<px4::params::GF_ACTION>) _param_geofence_action,
|
||||
|
||||
Reference in New Issue
Block a user