PX4 Firmware
PX4 Autopilot Software http://px4.io
RCUpdate Namespace Reference

Classes

struct  ParameterHandles
 
struct  Parameters
 
class  RCUpdate
 class RCUpdate More...
 

Functions

void initialize_parameter_handles (ParameterHandles &parameter_handles)
 initialize ParameterHandles struct More...
 
int update_parameters (const ParameterHandles &parameter_handles, Parameters &parameters)
 Read out the parameters using the handles into the parameters struct. More...
 

Variables

static constexpr unsigned RC_MAX_CHAN_COUNT
 maximum number of r/c channels we handle More...
 

Function Documentation

◆ initialize_parameter_handles()

void RCUpdate::initialize_parameter_handles ( ParameterHandles parameter_handles)

initialize ParameterHandles struct

Definition at line 45 of file parameters.cpp.

References RCUpdate::ParameterHandles::dz, RCUpdate::ParameterHandles::max, RCUpdate::ParameterHandles::min, name, param_find(), RCUpdate::ParameterHandles::rc_acro_th, RCUpdate::ParameterHandles::rc_armswitch_th, RCUpdate::ParameterHandles::rc_assist_th, RCUpdate::ParameterHandles::rc_auto_th, RCUpdate::ParameterHandles::rc_fails_thr, RCUpdate::ParameterHandles::rc_flt_cutoff, RCUpdate::ParameterHandles::rc_flt_smp_rate, RCUpdate::ParameterHandles::rc_gear_th, RCUpdate::ParameterHandles::rc_killswitch_th, RCUpdate::ParameterHandles::rc_loiter_th, RCUpdate::ParameterHandles::rc_man_th, RCUpdate::ParameterHandles::rc_map_acro_sw, RCUpdate::ParameterHandles::rc_map_arm_sw, RCUpdate::ParameterHandles::rc_map_aux1, RCUpdate::ParameterHandles::rc_map_aux2, RCUpdate::ParameterHandles::rc_map_aux3, RCUpdate::ParameterHandles::rc_map_aux4, RCUpdate::ParameterHandles::rc_map_aux5, RCUpdate::ParameterHandles::rc_map_aux6, RCUpdate::ParameterHandles::rc_map_failsafe, RCUpdate::ParameterHandles::rc_map_flaps, RCUpdate::ParameterHandles::rc_map_flightmode, RCUpdate::ParameterHandles::rc_map_gear_sw, RCUpdate::ParameterHandles::rc_map_kill_sw, RCUpdate::ParameterHandles::rc_map_loiter_sw, RCUpdate::ParameterHandles::rc_map_man_sw, RCUpdate::ParameterHandles::rc_map_mode_sw, RCUpdate::ParameterHandles::rc_map_offboard_sw, RCUpdate::ParameterHandles::rc_map_param, RCUpdate::ParameterHandles::rc_map_pitch, RCUpdate::ParameterHandles::rc_map_posctl_sw, RCUpdate::ParameterHandles::rc_map_rattitude_sw, RCUpdate::ParameterHandles::rc_map_return_sw, RCUpdate::ParameterHandles::rc_map_roll, RCUpdate::ParameterHandles::rc_map_stab_sw, RCUpdate::ParameterHandles::rc_map_throttle, RCUpdate::ParameterHandles::rc_map_trans_sw, RCUpdate::ParameterHandles::rc_map_yaw, RC_MAX_CHAN_COUNT, RCUpdate::ParameterHandles::rc_offboard_th, RCUpdate::ParameterHandles::rc_posctl_th, RCUpdate::ParameterHandles::rc_rattitude_th, RCUpdate::ParameterHandles::rc_return_th, RCUpdate::ParameterHandles::rc_stab_th, RCUpdate::ParameterHandles::rc_trans_th, RCUpdate::ParameterHandles::rev, and RCUpdate::ParameterHandles::trim.

Referenced by RCUpdate::RCUpdate::RCUpdate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_parameters()

int RCUpdate::update_parameters ( const ParameterHandles parameter_handles,
Parameters parameters 
)

Read out the parameters using the handles into the parameters struct.

Returns
0 on success, <0 on error

Definition at line 142 of file parameters.cpp.

References RCUpdate::Parameters::dz, RCUpdate::ParameterHandles::dz, f(), RCUpdate::Parameters::max, math::max(), RCUpdate::ParameterHandles::max, math::min(), RCUpdate::Parameters::min, RCUpdate::ParameterHandles::min, OK, param_get(), RCUpdate::Parameters::rc_acro_inv, RCUpdate::Parameters::rc_acro_th, RCUpdate::ParameterHandles::rc_acro_th, RCUpdate::Parameters::rc_armswitch_inv, RCUpdate::Parameters::rc_armswitch_th, RCUpdate::ParameterHandles::rc_armswitch_th, RCUpdate::Parameters::rc_assist_inv, RCUpdate::Parameters::rc_assist_th, RCUpdate::ParameterHandles::rc_assist_th, RCUpdate::Parameters::rc_auto_inv, RCUpdate::Parameters::rc_auto_th, RCUpdate::ParameterHandles::rc_auto_th, RCUpdate::Parameters::rc_fails_thr, RCUpdate::ParameterHandles::rc_fails_thr, RCUpdate::Parameters::rc_flt_cutoff, RCUpdate::ParameterHandles::rc_flt_cutoff, RCUpdate::Parameters::rc_flt_smp_rate, RCUpdate::ParameterHandles::rc_flt_smp_rate, RCUpdate::Parameters::rc_gear_inv, RCUpdate::Parameters::rc_gear_th, RCUpdate::ParameterHandles::rc_gear_th, RCUpdate::Parameters::rc_killswitch_inv, RCUpdate::Parameters::rc_killswitch_th, RCUpdate::ParameterHandles::rc_killswitch_th, RCUpdate::Parameters::rc_loiter_inv, RCUpdate::Parameters::rc_loiter_th, RCUpdate::ParameterHandles::rc_loiter_th, RCUpdate::Parameters::rc_man_inv, RCUpdate::Parameters::rc_man_th, RCUpdate::ParameterHandles::rc_man_th, RCUpdate::Parameters::rc_map_acro_sw, RCUpdate::ParameterHandles::rc_map_acro_sw, RCUpdate::Parameters::rc_map_arm_sw, RCUpdate::ParameterHandles::rc_map_arm_sw, RCUpdate::Parameters::rc_map_aux1, RCUpdate::ParameterHandles::rc_map_aux1, RCUpdate::Parameters::rc_map_aux2, RCUpdate::ParameterHandles::rc_map_aux2, RCUpdate::Parameters::rc_map_aux3, RCUpdate::ParameterHandles::rc_map_aux3, RCUpdate::Parameters::rc_map_aux4, RCUpdate::ParameterHandles::rc_map_aux4, RCUpdate::Parameters::rc_map_aux5, RCUpdate::ParameterHandles::rc_map_aux5, RCUpdate::Parameters::rc_map_aux6, RCUpdate::ParameterHandles::rc_map_aux6, RCUpdate::Parameters::rc_map_failsafe, RCUpdate::ParameterHandles::rc_map_failsafe, RCUpdate::Parameters::rc_map_flaps, RCUpdate::ParameterHandles::rc_map_flaps, RCUpdate::Parameters::rc_map_flightmode, RCUpdate::ParameterHandles::rc_map_flightmode, RCUpdate::Parameters::rc_map_gear_sw, RCUpdate::ParameterHandles::rc_map_gear_sw, RCUpdate::Parameters::rc_map_kill_sw, RCUpdate::ParameterHandles::rc_map_kill_sw, RCUpdate::Parameters::rc_map_loiter_sw, RCUpdate::ParameterHandles::rc_map_loiter_sw, RCUpdate::Parameters::rc_map_man_sw, RCUpdate::ParameterHandles::rc_map_man_sw, RCUpdate::Parameters::rc_map_mode_sw, RCUpdate::ParameterHandles::rc_map_mode_sw, RCUpdate::Parameters::rc_map_offboard_sw, RCUpdate::ParameterHandles::rc_map_offboard_sw, RCUpdate::Parameters::rc_map_param, RCUpdate::ParameterHandles::rc_map_param, RCUpdate::Parameters::rc_map_pitch, RCUpdate::ParameterHandles::rc_map_pitch, RCUpdate::Parameters::rc_map_posctl_sw, RCUpdate::ParameterHandles::rc_map_posctl_sw, RCUpdate::Parameters::rc_map_rattitude_sw, RCUpdate::ParameterHandles::rc_map_rattitude_sw, RCUpdate::Parameters::rc_map_return_sw, RCUpdate::ParameterHandles::rc_map_return_sw, RCUpdate::Parameters::rc_map_roll, RCUpdate::ParameterHandles::rc_map_roll, RCUpdate::Parameters::rc_map_stab_sw, RCUpdate::ParameterHandles::rc_map_stab_sw, RCUpdate::Parameters::rc_map_throttle, RCUpdate::ParameterHandles::rc_map_throttle, RCUpdate::Parameters::rc_map_trans_sw, RCUpdate::ParameterHandles::rc_map_trans_sw, RCUpdate::Parameters::rc_map_yaw, RCUpdate::ParameterHandles::rc_map_yaw, RC_MAX_CHAN_COUNT, RCUpdate::Parameters::rc_offboard_inv, RCUpdate::Parameters::rc_offboard_th, RCUpdate::ParameterHandles::rc_offboard_th, RCUpdate::Parameters::rc_posctl_inv, RCUpdate::Parameters::rc_posctl_th, RCUpdate::ParameterHandles::rc_posctl_th, RCUpdate::Parameters::rc_rattitude_inv, RCUpdate::Parameters::rc_rattitude_th, RCUpdate::ParameterHandles::rc_rattitude_th, RCUpdate::Parameters::rc_return_inv, RCUpdate::Parameters::rc_return_th, RCUpdate::ParameterHandles::rc_return_th, RCUpdate::Parameters::rc_stab_inv, RCUpdate::Parameters::rc_stab_th, RCUpdate::ParameterHandles::rc_stab_th, RCUpdate::Parameters::rc_trans_inv, RCUpdate::Parameters::rc_trans_th, RCUpdate::ParameterHandles::rc_trans_th, RCUpdate::Parameters::rev, RCUpdate::ParameterHandles::rev, RCUpdate::Parameters::scaling_factor, RCUpdate::Parameters::trim, and RCUpdate::ParameterHandles::trim.

Referenced by RCUpdate::RCUpdate::parameters_updated().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ RC_MAX_CHAN_COUNT

constexpr unsigned RCUpdate::RC_MAX_CHAN_COUNT
static
Initial value:
=
input_rc_s::RC_INPUT_MAX_CHANNELS

maximum number of r/c channels we handle

Definition at line 54 of file parameters.h.

Referenced by initialize_parameter_handles(), RCUpdate::RCUpdate::Run(), and update_parameters().