Replace CBRK_AIRSPD_CHK with SYS_HAS_NUM_ASPD

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2023-12-21 11:34:28 +01:00
parent 9e0c8fd75e
commit 29807a5e50
12 changed files with 38 additions and 29 deletions
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2019 PX4 Development Team. All rights reserved.
* Copyright (c) 2019-2023 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -43,7 +43,7 @@ AirspeedChecks::AirspeedChecks()
void AirspeedChecks::checkAndReport(const Context &context, Report &reporter)
{
if (circuit_breaker_enabled_by_val(_param_cbrk_airspd_chk.get(), CBRK_AIRSPD_CHK_KEY) ||
if (_param_sys_has_num_aspd.get() <= 0 ||
(context.status().vehicle_type != vehicle_status_s::VEHICLE_TYPE_FIXED_WING && !context.status().is_vtol)) {
return;
}
@@ -102,7 +102,7 @@ void AirspeedChecks::checkAndReport(const Context &context, Report &reporter)
* @description
* <profile name="dev">
* Most likely the airspeed selector module is not running.
* This check can be configured via <param>CBRK_AIRSPD_CHK</param> parameter.
* This check can be configured via <param>SYS_HAS_NUM_ASPD</param> parameter.
* </profile>
*/
reporter.healthFailure(NavModes::All, health_component_t::differential_pressure,
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2022 PX4 Development Team. All rights reserved.
* Copyright (c) 2022-2023 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -52,6 +52,6 @@ private:
const param_t _param_fw_airspd_max_handle;
DEFINE_PARAMETERS_CUSTOM_PARENT(HealthAndArmingCheckBase,
(ParamInt<px4::params::CBRK_AIRSPD_CHK>) _param_cbrk_airspd_chk
(ParamInt<px4::params::SYS_HAS_NUM_ASPD>) _param_sys_has_num_aspd
)
};