fix build and rename _param_escs_checks_required

This commit is contained in:
Jacob Dahl
2026-01-27 15:39:49 -09:00
parent 458c775bfd
commit c434ef1507
3 changed files with 6 additions and 6 deletions
@@ -82,7 +82,7 @@ void EscChecks::checkAndReport(const Context &context, Report &reporter)
checkEscStatus(context, reporter, esc_status);
reporter.setIsPresent(health_component_t::motors_escs);
} else if (_param_escs_checks_required.get()
} else if (_param_com_arm_chk_escs.get()
&& now - _start_time > 5_s) { // Wait a bit after startup to allow esc's to init
/* EVENT
@@ -102,7 +102,7 @@ void EscChecks::checkAndReport(const Context &context, Report &reporter)
void EscChecks::checkEscStatus(const Context &context, Report &reporter, const esc_status_s &esc_status)
{
const NavModes required_modes = _param_escs_checks_required.get() ? NavModes::All : NavModes::None;
const NavModes required_modes = _param_com_arm_chk_escs.get() ? NavModes::All : NavModes::None;
if (esc_status.esc_count > 0) {
// Check if one or more the ESCs are offline
@@ -118,7 +118,7 @@ void EscChecks::checkEscStatus(const Context &context, Report &reporter, const e
uint8_t actuator_function = esc_status.esc[i].actuator_function;
bool is_motor = math::isInRange(actuator_function, actuator_motors_s::ACTUATOR_FUNCTION_MOTOR1,
actuator_motors_s::ACTUATOR_FUNCTION_MOTOR1 + actuator_motors_s::NUM_CONTROLS - 1);
uint8_t(actuator_motors_s::ACTUATOR_FUNCTION_MOTOR1 + actuator_motors_s::NUM_CONTROLS - 1));
bool is_online = esc_status.esc_online_flags & (1 << i);
if (is_motor && !is_online) {
@@ -54,6 +54,6 @@ private:
const hrt_abstime _start_time{hrt_absolute_time()};
DEFINE_PARAMETERS_CUSTOM_PARENT(HealthAndArmingCheckBase,
(ParamBool<px4::params::COM_ARM_CHK_ESCS>) _param_escs_checks_required
(ParamBool<px4::params::COM_ARM_CHK_ESCS>) _param_com_arm_chk_escs
)
};
+2 -2
View File
@@ -607,8 +607,8 @@ void MavlinkReceiver::handle_message_command_both(mavlink_message_t *msg, const
if (message_id == MAVLINK_MSG_ID_ESC_EEPROM) {
PX4_INFO("publishing MAV_CMD_REQUEST_MESSAGE for MAVLINK_MSG_ID_ESC_EEPROM");
_cmd_pub.publish(vehicle_command);
else
if (1)
#else
if (1) {
// no-op
#endif
} else if (message_id == MAVLINK_MSG_ID_MESSAGE_INTERVAL) {