PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Functions | |
static void | usage () |
static void | start () |
static void | stop () |
static int | pwm_initialize (const char *device) |
static void | pwm_deinitialize () |
static void | send_outputs_pwm (const uint16_t *pwm) |
static void | task_main_trampoline (int argc, char *argv[]) |
static void | subscribe () |
static void | task_main (int argc, char *argv[]) |
static void | update_params (Mixer::Airmode &airmode) |
int | initialize_mixer (const char *mixer_filename) |
int | mixer_control_callback (uintptr_t handle, uint8_t control_group, uint8_t control_index, float &input) |
Variables | |
static px4_task_t | _task_handle = -1 |
volatile bool | _task_should_exit = false |
static bool | _is_running = false |
static const int | NUM_PWM = 4 |
static char | _device [] = "/dev/pwm-1" |
static const int | PIN_GPIO = 27 |
static struct ::dspal_pwm_ioctl_signal_definition | _signal_definition |
static struct ::dspal_pwm | _pwm_gpio [NUM_PWM] |
static struct ::dspal_pwm_ioctl_update_buffer * | _update_buffer |
static struct ::dspal_pwm * | _pwm |
static const int | FREQUENCY_PWM_HZ = 400 |
static char | _mixer_filename [32] = "/dev/fs/quad_x.main.mix" |
int | _controls_subs [actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS] |
int | _armed_sub |
int | _fd = -1 |
orb_advert_t | _outputs_pub = nullptr |
actuator_controls_s | _controls [actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS] |
orb_id_t | _controls_topics [actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS] |
actuator_outputs_s | _outputs |
actuator_armed_s | _armed |
uint8_t | _poll_fds_num = 0 |
px4_pollfd_struct_t | _poll_fds [actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS] |
uint32_t | _groups_required = 0 |
output_limit_t | _pwm_limit |
int32_t | _pwm_disarmed |
int32_t | _pwm_min |
int32_t | _pwm_max |
MultirotorMixer * | _mixer = nullptr |
perf_counter_t | _perf_control_latency = nullptr |
int snapdragon_pwm::initialize_mixer | ( | const char * | mixer_filename | ) |
Definition at line 176 of file snapdragon_pwm_out.cpp.
References MultirotorMixer::from_text(), mixer_control_callback(), and read().
Referenced by task_main().
int snapdragon_pwm::mixer_control_callback | ( | uintptr_t | handle, |
uint8_t | control_group, | ||
uint8_t | control_index, | ||
float & | input | ||
) |
Definition at line 154 of file snapdragon_pwm_out.cpp.
References actuator_controls_s::control.
Referenced by initialize_mixer().
|
static |
Definition at line 300 of file snapdragon_pwm_out.cpp.
References _mixer.
Referenced by task_main().
|
static |
Definition at line 251 of file snapdragon_pwm_out.cpp.
References _pwm_gpio, FREQUENCY_PWM_HZ, and NUM_PWM.
Referenced by task_main().
|
static |
Definition at line 307 of file snapdragon_pwm_out.cpp.
References NUM_PWM.
Referenced by task_main().
|
static |
Definition at line 481 of file snapdragon_pwm_out.cpp.
References task_main_trampoline().
Referenced by snapdragon_pwm_out_main().
|
static |
Definition at line 500 of file snapdragon_pwm_out.cpp.
Referenced by snapdragon_pwm_out_main().
|
static |
Definition at line 204 of file snapdragon_pwm_out.cpp.
References _poll_fds_num, ORB_ID, and orb_subscribe().
Referenced by task_main().
|
static |
Definition at line 317 of file snapdragon_pwm_out.cpp.
References _pwm_disarmed, _pwm_max, _pwm_min, actuator_armed_s::armed, Mixer::disabled, MultirotorMixer::groups_required(), hrt_absolute_time(), hrt_abstime, initialize_mixer(), actuator_armed_s::lockdown, actuator_armed_s::manual_lockdown, MultirotorMixer::mix(), actuator_outputs_s::noutputs, orb_advertise(), orb_check(), orb_copy(), ORB_ID, orb_publish(), orb_unsubscribe(), actuator_outputs_s::output, output_limit_calc(), output_limit_init(), PC_ELAPSED, perf_alloc, perf_free(), perf_set_elapsed(), actuator_armed_s::prearmed, pwm_deinitialize(), pwm_initialize(), px4_poll(), send_outputs_pwm(), MultirotorMixer::set_airmode(), subscribe(), actuator_outputs_s::timestamp, actuator_controls_s::timestamp_sample, and update_params().
Referenced by task_main_trampoline().
|
static |
Definition at line 476 of file snapdragon_pwm_out.cpp.
References task_main().
Referenced by start().
|
static |
Definition at line 166 of file snapdragon_pwm_out.cpp.
References param_find(), param_get(), and PARAM_INVALID.
Referenced by task_main().
|
static |
Definition at line 512 of file snapdragon_pwm_out.cpp.
References snapdragon_pwm_out_main().
Referenced by snapdragon_pwm_out_main().
actuator_armed_s snapdragon_pwm::_armed |
Definition at line 99 of file snapdragon_pwm_out.cpp.
int snapdragon_pwm::_armed_sub |
Definition at line 89 of file snapdragon_pwm_out.cpp.
actuator_controls_s snapdragon_pwm::_controls[actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS] |
Definition at line 96 of file snapdragon_pwm_out.cpp.
int snapdragon_pwm::_controls_subs[actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS] |
Definition at line 88 of file snapdragon_pwm_out.cpp.
orb_id_t snapdragon_pwm::_controls_topics[actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS] |
Definition at line 97 of file snapdragon_pwm_out.cpp.
|
static |
Definition at line 71 of file snapdragon_pwm_out.cpp.
Referenced by snapdragon_pwm_out_main().
int snapdragon_pwm::_fd = -1 |
Definition at line 90 of file snapdragon_pwm_out.cpp.
uint32_t snapdragon_pwm::_groups_required = 0 |
Definition at line 106 of file snapdragon_pwm_out.cpp.
|
static |
Definition at line 69 of file snapdragon_pwm_out.cpp.
Referenced by snapdragon_pwm_out_main().
MultirotorMixer* snapdragon_pwm::_mixer = nullptr |
Definition at line 116 of file snapdragon_pwm_out.cpp.
Referenced by pwm_deinitialize().
|
static |
Definition at line 85 of file snapdragon_pwm_out.cpp.
Referenced by snapdragon_pwm_out_main().
actuator_outputs_s snapdragon_pwm::_outputs |
Definition at line 98 of file snapdragon_pwm_out.cpp.
orb_advert_t snapdragon_pwm::_outputs_pub = nullptr |
Definition at line 93 of file snapdragon_pwm_out.cpp.
perf_counter_t snapdragon_pwm::_perf_control_latency = nullptr |
Definition at line 118 of file snapdragon_pwm_out.cpp.
px4_pollfd_struct_t snapdragon_pwm::_poll_fds[actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS] |
Definition at line 103 of file snapdragon_pwm_out.cpp.
uint8_t snapdragon_pwm::_poll_fds_num = 0 |
Definition at line 102 of file snapdragon_pwm_out.cpp.
Referenced by subscribe().
|
static |
Definition at line 78 of file snapdragon_pwm_out.cpp.
int32_t snapdragon_pwm::_pwm_disarmed |
Definition at line 112 of file snapdragon_pwm_out.cpp.
Referenced by snapdragon_pwm_out_main(), and task_main().
|
static |
Definition at line 76 of file snapdragon_pwm_out.cpp.
Referenced by pwm_initialize().
output_limit_t snapdragon_pwm::_pwm_limit |
Definition at line 109 of file snapdragon_pwm_out.cpp.
int32_t snapdragon_pwm::_pwm_max |
Definition at line 114 of file snapdragon_pwm_out.cpp.
Referenced by snapdragon_pwm_out_main(), and task_main().
int32_t snapdragon_pwm::_pwm_min |
Definition at line 113 of file snapdragon_pwm_out.cpp.
Referenced by snapdragon_pwm_out_main(), and task_main().
|
static |
Definition at line 75 of file snapdragon_pwm_out.cpp.
|
static |
Definition at line 67 of file snapdragon_pwm_out.cpp.
volatile bool snapdragon_pwm::_task_should_exit = false |
Definition at line 68 of file snapdragon_pwm_out.cpp.
|
static |
Definition at line 77 of file snapdragon_pwm_out.cpp.
|
static |
Definition at line 81 of file snapdragon_pwm_out.cpp.
Referenced by pwm_initialize().
|
static |
Definition at line 70 of file snapdragon_pwm_out.cpp.
Referenced by pwm_initialize(), and send_outputs_pwm().
|
static |
Definition at line 74 of file snapdragon_pwm_out.cpp.