mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 02:03:33 +08:00
Switch assignment: added manual and stabilized switch for a default stabilized switch scheme, let FW go into Acro
This commit is contained in:
committed by
Andreas Daniel Antener
parent
21f5219bbc
commit
a5f3f65c2b
@@ -103,6 +103,8 @@ void RCUpdate::update_rc_functions()
|
||||
_rc.function[rc_channels_s::RC_CHANNELS_FUNCTION_ARMSWITCH] = _parameters.rc_map_arm_sw - 1;
|
||||
_rc.function[rc_channels_s::RC_CHANNELS_FUNCTION_TRANSITION] = _parameters.rc_map_trans_sw - 1;
|
||||
_rc.function[rc_channels_s::RC_CHANNELS_FUNCTION_GEAR] = _parameters.rc_map_gear_sw - 1;
|
||||
_rc.function[rc_channels_s::RC_CHANNELS_FUNCTION_STAB] = _parameters.rc_map_stab_sw - 1;
|
||||
_rc.function[rc_channels_s::RC_CHANNELS_FUNCTION_MAN] = _parameters.rc_map_man_sw - 1;
|
||||
|
||||
_rc.function[rc_channels_s::RC_CHANNELS_FUNCTION_FLAPS] = _parameters.rc_map_flaps - 1;
|
||||
|
||||
@@ -434,6 +436,10 @@ RCUpdate::rc_poll(const ParameterHandles ¶meter_handles)
|
||||
_parameters.rc_trans_th, _parameters.rc_trans_inv);
|
||||
manual.gear_switch = get_rc_sw2pos_position(rc_channels_s::RC_CHANNELS_FUNCTION_GEAR,
|
||||
_parameters.rc_gear_th, _parameters.rc_gear_inv);
|
||||
manual.stab_switch = get_rc_sw2pos_position(rc_channels_s::RC_CHANNELS_FUNCTION_STAB,
|
||||
_parameters.rc_stab_th, _parameters.rc_stab_inv);
|
||||
manual.man_switch = get_rc_sw2pos_position(rc_channels_s::RC_CHANNELS_FUNCTION_MAN,
|
||||
_parameters.rc_man_th, _parameters.rc_man_inv);
|
||||
|
||||
/* publish manual_control_setpoint topic */
|
||||
orb_publish_auto(ORB_ID(manual_control_setpoint), &_manual_control_pub, &manual, &instance,
|
||||
|
||||
Reference in New Issue
Block a user