mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-30 10:40:35 +08:00
Commander: don't publish RC_IN_MODE to vehicle_status
This just contains the content of the parameter which is redundant and results in multiple sources of truth.
This commit is contained in:
@@ -197,7 +197,10 @@ bool PreFlightCheck::preflightCheck(orb_advert_t *mavlink_log_pub, vehicle_statu
|
||||
}
|
||||
|
||||
/* ---- RC CALIBRATION ---- */
|
||||
if (status.rc_input_mode == vehicle_status_s::RC_IN_MODE_DEFAULT) {
|
||||
int32_t com_rc_in_mode{0};
|
||||
param_get(param_find("COM_RC_IN_MODE"), &com_rc_in_mode);
|
||||
|
||||
if (com_rc_in_mode == 0) {
|
||||
if (rcCalibrationCheck(mavlink_log_pub, report_failures, status.is_vtol) != OK) {
|
||||
if (report_failures) {
|
||||
mavlink_log_critical(mavlink_log_pub, "RC calibration check failed");
|
||||
|
||||
@@ -659,7 +659,6 @@ Commander::Commander() :
|
||||
_status_flags.condition_system_sensors_initialized = true;
|
||||
|
||||
// We want to accept RC inputs as default
|
||||
_status.rc_input_mode = vehicle_status_s::RC_IN_MODE_DEFAULT;
|
||||
_status.nav_state = vehicle_status_s::NAVIGATION_STATE_MANUAL;
|
||||
_status.nav_state_timestamp = hrt_absolute_time();
|
||||
_status.arming_state = vehicle_status_s::ARMING_STATE_INIT;
|
||||
@@ -1840,8 +1839,6 @@ Commander::run()
|
||||
|
||||
_status_flags.avoidance_system_required = _param_com_obs_avoid.get();
|
||||
|
||||
_status.rc_input_mode = _param_rc_in_off.get();
|
||||
|
||||
_arm_requirements.arm_authorization = _param_arm_auth_required.get();
|
||||
_arm_requirements.esc_check = _param_escs_checks_required.get();
|
||||
_arm_requirements.global_position = !_param_arm_without_gps.get();
|
||||
|
||||
@@ -245,8 +245,6 @@ private:
|
||||
(ParamInt<px4::params::COM_FLIGHT_UUID>) _param_flight_uuid,
|
||||
(ParamInt<px4::params::COM_TAKEOFF_ACT>) _param_takeoff_finished_action,
|
||||
|
||||
(ParamInt<px4::params::COM_RC_IN_MODE>) _param_rc_in_off,
|
||||
|
||||
// Circuit breakers
|
||||
(ParamInt<px4::params::CBRK_SUPPLY_CHK>) _param_cbrk_supply_chk,
|
||||
(ParamInt<px4::params::CBRK_USB_CHK>) _param_cbrk_usb_chk,
|
||||
|
||||
Reference in New Issue
Block a user