mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +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:
parent
fff2de43a5
commit
7a2ef4a917
@ -48,10 +48,6 @@ uint8 NAVIGATION_STATE_AUTO_PRECLAND = 20 # Precision land with landing target
|
||||
uint8 NAVIGATION_STATE_ORBIT = 21 # Orbit in a circle
|
||||
uint8 NAVIGATION_STATE_MAX = 22
|
||||
|
||||
uint8 RC_IN_MODE_DEFAULT = 0
|
||||
uint8 RC_IN_MODE_OFF = 1
|
||||
uint8 RC_IN_MODE_GENERATED = 2
|
||||
|
||||
uint8 VEHICLE_TYPE_UNKNOWN = 0
|
||||
uint8 VEHICLE_TYPE_ROTARY_WING = 1
|
||||
uint8 VEHICLE_TYPE_FIXED_WING = 2
|
||||
@ -83,7 +79,6 @@ bool in_transition_mode # True if VTOL is doing a transition
|
||||
bool in_transition_to_fw # True if VTOL is doing a transition from MC to FW
|
||||
|
||||
bool rc_signal_lost # true if RC reception lost
|
||||
uint8 rc_input_mode # set to 1 to disable the RC input, 2 to enable manual control to RC in mapping.
|
||||
|
||||
bool data_link_lost # datalink to GCS lost
|
||||
uint8 data_link_lost_counter # counts unique data link lost events
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user