mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +08:00
Commander: remove check for FW_ARSP_MODE for airspeed missing reporting
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
using namespace time_literals;
|
using namespace time_literals;
|
||||||
|
|
||||||
AirspeedChecks::AirspeedChecks()
|
AirspeedChecks::AirspeedChecks()
|
||||||
: _param_fw_arsp_mode_handle(param_find("FW_ARSP_MODE")), _param_fw_airspd_max_handle(param_find("FW_AIRSPD_MAX"))
|
: _param_fw_airspd_max_handle(param_find("FW_AIRSPD_MAX"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,10 +48,6 @@ void AirspeedChecks::checkAndReport(const Context &context, Report &reporter)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t airspeed_mode = 0;
|
|
||||||
param_get(_param_fw_arsp_mode_handle, &airspeed_mode);
|
|
||||||
const bool optional = (airspeed_mode == 1);
|
|
||||||
|
|
||||||
airspeed_validated_s airspeed_validated;
|
airspeed_validated_s airspeed_validated;
|
||||||
|
|
||||||
if (_airspeed_validated_sub.copy(&airspeed_validated) && hrt_elapsed_time(&airspeed_validated.timestamp) < 1_s) {
|
if (_airspeed_validated_sub.copy(&airspeed_validated) && hrt_elapsed_time(&airspeed_validated.timestamp) < 1_s) {
|
||||||
@@ -100,7 +96,7 @@ void AirspeedChecks::checkAndReport(const Context &context, Report &reporter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (!optional) {
|
} else {
|
||||||
|
|
||||||
/* EVENT
|
/* EVENT
|
||||||
* @description
|
* @description
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
uORB::Subscription _airspeed_validated_sub{ORB_ID(airspeed_validated)};
|
uORB::Subscription _airspeed_validated_sub{ORB_ID(airspeed_validated)};
|
||||||
|
|
||||||
const param_t _param_fw_arsp_mode_handle;
|
|
||||||
const param_t _param_fw_airspd_max_handle;
|
const param_t _param_fw_airspd_max_handle;
|
||||||
|
|
||||||
DEFINE_PARAMETERS_CUSTOM_PARENT(HealthAndArmingCheckBase,
|
DEFINE_PARAMETERS_CUSTOM_PARENT(HealthAndArmingCheckBase,
|
||||||
|
|||||||
Reference in New Issue
Block a user