APM:Libraries
|
#include <SRV_Channel.h>
Public Member Functions | |
SRV_Channel (void) | |
void | set_output_pwm (uint16_t pwm) |
uint16_t | get_output_pwm (void) const |
void | set_angle (int16_t angle) |
void | set_range (uint16_t high) |
bool | get_reversed (void) const |
void | set_output_min (uint16_t pwm) |
void | set_output_max (uint16_t pwm) |
uint16_t | get_output_min (void) const |
uint16_t | get_output_max (void) const |
uint16_t | get_trim (void) const |
SRV_Channel::Aux_servo_function_t | get_function (void) const |
void | function_set_and_save (SRV_Channel::Aux_servo_function_t f) |
void | reversed_set_and_save_ifchanged (bool r) |
bool | function_configured (void) const |
Static Public Member Functions | |
static bool | is_motor (SRV_Channel::Aux_servo_function_t function) |
Static Public Attributes | |
static const struct AP_Param::GroupInfo | var_info [] |
Private Types | |
typedef uint16_t | servo_mask_t |
Private Member Functions | |
uint16_t | pwm_from_range (int16_t scaled_value) const |
uint16_t | pwm_from_angle (int16_t scaled_value) const |
void | calc_pwm (int16_t output_scaled) |
void | output_ch (void) |
map a function to a servo channel and output it More... | |
void | aux_servo_function_setup (void) |
uint16_t | get_limit_pwm (LimitValue limit) const |
float | get_output_norm (void) |
Private Attributes | |
AP_Int16 | servo_min |
AP_Int16 | servo_max |
AP_Int16 | servo_trim |
AP_Int8 | reversed |
AP_Int8 | function |
uint16_t | output_pwm |
bool | type_angle:1 |
bool | type_setup:1 |
uint8_t | ch_num |
uint16_t | high_out |
Static Private Attributes | |
static servo_mask_t | have_pwm_mask |
Friends | |
class | SRV_Channels |
Definition at line 33 of file SRV_Channel.h.
|
private |
Definition at line 241 of file SRV_Channel.h.
Definition at line 42 of file SRV_Channel.h.
Enumerator | |
---|---|
SRV_CHANNEL_LIMIT_TRIM | |
SRV_CHANNEL_LIMIT_MIN | |
SRV_CHANNEL_LIMIT_MAX | |
SRV_CHANNEL_LIMIT_ZERO_PWM |
Definition at line 128 of file SRV_Channel.h.
SRV_Channel::SRV_Channel | ( | void | ) |
|
private |
|
private |
Definition at line 110 of file SRV_Channel.cpp.
Referenced by SRV_Channels::calc_pwm(), SRV_Channels::disable_passthrough(), and SRV_Channels::limit_slew_rate().
|
inline |
Definition at line 192 of file SRV_Channel.h.
|
inline |
Definition at line 180 of file SRV_Channel.h.
|
inline |
Definition at line 175 of file SRV_Channel.h.
Referenced by AP_Arming::servo_checks().
|
private |
Definition at line 169 of file SRV_Channel.cpp.
Referenced by SRV_Channels::set_failsafe_limit(), SRV_Channels::set_output_limit(), and SRV_Channels::set_safety_limit().
|
inline |
Definition at line 164 of file SRV_Channel.h.
Referenced by AP_Motors::calc_pwm_output_0to1(), AP_Motors::calc_pwm_output_1to1(), AP_MotorsHeli::calc_pwm_output_1to1_swash_servo(), AP_MotorsTri::calc_yaw_radio_output(), SRV_Channels::limit_slew_rate(), AP_Arming::servo_checks(), SRV_Channels::set_esc_scaling_for(), SRV_Channels::set_output_pwm_trimmed(), and AP_Volz_Protocol::update().
|
inline |
Definition at line 161 of file SRV_Channel.h.
Referenced by AP_Motors::calc_pwm_output_0to1(), AP_Motors::calc_pwm_output_1to1(), AP_MotorsHeli::calc_pwm_output_1to1_swash_servo(), AP_MotorsTri::calc_yaw_radio_output(), SRV_Channels::limit_slew_rate(), AP_Arming::servo_checks(), SRV_Channels::set_esc_scaling_for(), SRV_Channels::set_output_pwm_trimmed(), and AP_Volz_Protocol::update().
|
private |
|
inline |
Definition at line 139 of file SRV_Channel.h.
Referenced by GCS_MAVLINK::send_servo_output_raw(), AP_SBusOut::update(), AP_Volz_Protocol::update(), and AP_Landing_Deepstall::verify_land().
|
inline |
Definition at line 148 of file SRV_Channel.h.
Referenced by AP_Motors::calc_pwm_output_0to1(), AP_Motors::calc_pwm_output_1to1(), AP_MotorsHeli::calc_pwm_output_1to1_swash_servo(), AP_MotorsTri::calc_yaw_radio_output(), get_output_norm(), SRV_Channels::move_servo(), and SRV_Channels::set_trim_to_min_for().
|
inline |
Definition at line 167 of file SRV_Channel.h.
Referenced by AP_Motors::calc_pwm_output_1to1(), AP_MotorsHeli::calc_pwm_output_1to1_swash_servo(), AP_MotorsTri::calc_yaw_radio_output(), AP_MotorsTri::output_motor_mask(), AP_MotorsTri::output_to_motors(), AP_Arming::servo_checks(), and AP_ServoRelayEvents::update_events().
|
static |
Definition at line 185 of file SRV_Channel.cpp.
Referenced by get_trim().
|
private |
map a function to a servo channel and output it
Definition at line 28 of file SRV_Channel_aux.cpp.
|
private |
Definition at line 97 of file SRV_Channel.cpp.
Referenced by calc_pwm().
|
private |
Definition at line 84 of file SRV_Channel.cpp.
Referenced by calc_pwm().
|
inline |
Definition at line 185 of file SRV_Channel.h.
void SRV_Channel::set_angle | ( | int16_t | angle | ) |
Definition at line 131 of file SRV_Channel.cpp.
Referenced by aux_servo_function_setup(), get_output_pwm(), AP_MotorsHeli_Single::init_outputs(), SRV_Channels::set_reversible_throttle(), and setup().
|
inline |
Definition at line 156 of file SRV_Channel.h.
Referenced by AP_MotorsHeli::reset_swash_servo(), and setup().
|
inline |
Definition at line 153 of file SRV_Channel.h.
Referenced by AP_MotorsHeli::reset_swash_servo(), and setup().
void SRV_Channel::set_output_pwm | ( | uint16_t | pwm | ) |
Definition at line 124 of file SRV_Channel.cpp.
Referenced by calc_pwm(), AP_ServoRelayEvents::do_set_servo(), SRV_Channels::move_servo(), SRV_Channels::output_trim_all(), AP_Landing_Deepstall::override_servos(), SRV_Channels::set_output_limit(), SRV_Channels::set_output_pwm_chan(), and AP_ServoRelayEvents::update_events().
void SRV_Channel::set_range | ( | uint16_t | high | ) |
Definition at line 139 of file SRV_Channel.cpp.
Referenced by aux_servo_function_setup(), get_output_pwm(), AP_MotorsHeli::reset_swash_servo(), SRV_Channels::set_reversible_throttle(), and setup().
|
friend |
Definition at line 35 of file SRV_Channel.h.
|
private |
Definition at line 214 of file SRV_Channel.h.
Referenced by calc_pwm(), SRV_Channels::copy_radio_in_out(), SRV_Channels::copy_radio_in_out_mask(), SRV_Channels::enable_aux_servos(), SRV_Channels::limit_slew_rate(), output_ch(), SRV_Channels::set_failsafe_limit(), SRV_Channels::set_failsafe_pwm(), SRV_Channels::set_output_limit(), set_output_pwm(), SRV_Channels::set_rc_frequency(), SRV_Channels::set_safety_limit(), and SRV_Channels::SRV_Channels().
|
private |
Definition at line 202 of file SRV_Channel.h.
Referenced by SRV_Channels::adjust_trim(), SRV_Channels::constrain_pwm(), SRV_Channels::limit_slew_rate(), SRV_Channels::move_servo(), SRV_Channels::set_failsafe_limit(), SRV_Channels::set_failsafe_pwm(), SRV_Channels::set_output_limit(), SRV_Channels::set_rc_frequency(), SRV_Channels::set_safety_limit(), and SRV_Channels::upgrade_parameters().
|
staticprivate |
Definition at line 245 of file SRV_Channel.h.
Referenced by calc_pwm(), set_output_pwm(), SRV_Channels::set_output_scaled(), and SRV_Channel().
|
private |
Definition at line 217 of file SRV_Channel.h.
Referenced by pwm_from_angle(), pwm_from_range(), set_angle(), and set_range().
|
private |
Definition at line 205 of file SRV_Channel.h.
Referenced by SRV_Channels::constrain_pwm(), get_output_norm(), get_output_pwm(), SRV_Channels::limit_slew_rate(), output_ch(), set_output_pwm(), and SRV_Channels::set_trim_to_servo_out_for().
|
private |
Definition at line 201 of file SRV_Channel.h.
Referenced by SRV_Channels::adjust_trim(), get_reversed(), pwm_from_angle(), pwm_from_range(), reversed_set_and_save_ifchanged(), SRV_Channels::upgrade_motors_servo(), and SRV_Channels::upgrade_parameters().
|
private |
Definition at line 198 of file SRV_Channel.h.
Referenced by SRV_Channels::adjust_trim(), SRV_Channels::constrain_pwm(), get_limit_pwm(), get_output_max(), get_output_norm(), SRV_Channels::move_servo(), pwm_from_angle(), pwm_from_range(), set_output_max(), SRV_Channels::set_trim_to_min_for(), SRV_Channels::upgrade_motors_servo(), and SRV_Channels::upgrade_parameters().
|
private |
Definition at line 197 of file SRV_Channel.h.
Referenced by SRV_Channels::adjust_trim(), SRV_Channels::constrain_pwm(), get_limit_pwm(), get_output_min(), get_output_norm(), SRV_Channels::move_servo(), pwm_from_angle(), pwm_from_range(), set_output_min(), SRV_Channels::set_trim_to_min_for(), SRV_Channels::upgrade_motors_servo(), and SRV_Channels::upgrade_parameters().
|
private |
Definition at line 199 of file SRV_Channel.h.
Referenced by SRV_Channels::adjust_trim(), get_limit_pwm(), get_trim(), pwm_from_angle(), SRV_Channels::save_trim(), SRV_Channels::set_output_to_trim(), SRV_Channels::upgrade_motors_servo(), and SRV_Channels::upgrade_parameters().
|
private |
Definition at line 208 of file SRV_Channel.h.
Referenced by calc_pwm(), set_angle(), and set_range().
|
private |
Definition at line 211 of file SRV_Channel.h.
Referenced by aux_servo_function_setup(), set_angle(), and set_range().
|
static |
Definition at line 40 of file SRV_Channel.h.
Referenced by SRV_Channel().