FW controllers: change param FW_ARSP_MODE to FW_USE_AIRSPD

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2023-12-06 14:14:44 +01:00
parent 1f2a0bc657
commit 9e0c8fd75e
14 changed files with 35 additions and 19 deletions
@@ -150,7 +150,7 @@ float FixedwingAttitudeControl::get_airspeed_constrained()
// if no airspeed measurement is available out best guess is to use the trim airspeed
float airspeed = _param_fw_airspd_trim.get();
if ((_param_fw_arsp_mode.get() == 0) && airspeed_valid) {
if (_param_fw_use_airspd.get() && airspeed_valid) {
/* prevent numerical drama by requiring 0.5 m/s minimal speed */
airspeed = math::max(0.5f, _airspeed_validated_sub.get().calibrated_airspeed_m_s);