PX4 Firmware
PX4 Autopilot Software http://px4.io
linux_pwm_out.cpp File Reference
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <px4_platform_common/tasks.h>
#include <px4_platform_common/getopt.h>
#include <px4_platform_common/posix.h>
#include <uORB/Subscription.hpp>
#include <uORB/topics/actuator_controls.h>
#include <uORB/topics/actuator_outputs.h>
#include <uORB/topics/actuator_armed.h>
#include <uORB/topics/rc_channels.h>
#include <uORB/topics/parameter_update.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_mixer.h>
#include <lib/mixer/MixerGroup.hpp>
#include <lib/mixer/mixer_load.h>
#include <parameters/param.h>
#include <output_limit/output_limit.h>
#include <perf/perf_counter.h>
#include "common.h"
#include "navio_sysfs.h"
#include "PCA9685.h"
#include "ocpoc_mmap.h"
#include "bbblue_pwm_rc.h"
Include dependency graph for linux_pwm_out.cpp:

Go to the source code of this file.

Namespaces

 linux_pwm_out
 

Functions

static void linux_pwm_out::usage ()
 
static void linux_pwm_out::start ()
 
static void linux_pwm_out::stop ()
 
static void linux_pwm_out::task_main_trampoline (int argc, char *argv[])
 
static void linux_pwm_out::subscribe ()
 
static void linux_pwm_out::task_main (int argc, char *argv[])
 
static void linux_pwm_out::update_params (Mixer::Airmode &airmode)
 
int linux_pwm_out::initialize_mixer (const char *mixer_filename)
 
int linux_pwm_out::mixer_control_callback (uintptr_t handle, uint8_t control_group, uint8_t control_index, float &input)
 
__EXPORT int linux_pwm_out_main (int argc, char *argv[])
 

Variables

static px4_task_t linux_pwm_out::_task_handle = -1
 
volatile bool linux_pwm_out::_task_should_exit = false
 
static bool linux_pwm_out::_is_running = false
 
static char linux_pwm_out::_device [64] = "/sys/class/pwm/pwmchip0"
 
static char linux_pwm_out::_protocol [64] = "navio"
 
static int linux_pwm_out::_max_num_outputs = 8
 maximum number of outputs the driver should use More...
 
static char linux_pwm_out::_mixer_filename [64] = "ROMFS/px4fmu_common/mixers/quad_x.main.mix"
 
int linux_pwm_out::_controls_subs [actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS]
 
int linux_pwm_out::_armed_sub = -1
 
orb_advert_t linux_pwm_out::_outputs_pub = nullptr
 
orb_advert_t linux_pwm_out::_rc_pub = nullptr
 
perf_counter_t linux_pwm_out::_perf_control_latency = nullptr
 
actuator_controls_s linux_pwm_out::_controls [actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS]
 
orb_id_t linux_pwm_out::_controls_topics [actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS]
 
actuator_outputs_s linux_pwm_out::_outputs
 
actuator_armed_s linux_pwm_out::_armed
 
uint8_t linux_pwm_out::_poll_fds_num = 0
 
px4_pollfd_struct_t linux_pwm_out::_poll_fds [actuator_controls_s::NUM_ACTUATOR_CONTROL_GROUPS]
 
uint32_t linux_pwm_out::_groups_required = 0
 
uint32_t linux_pwm_out::_groups_subscribed = 0
 
output_limit_t linux_pwm_out::_pwm_limit
 
int32_t linux_pwm_out::_pwm_disarmed
 
int32_t linux_pwm_out::_pwm_min
 
int32_t linux_pwm_out::_pwm_max
 
MixerGrouplinux_pwm_out::_mixer_group = nullptr
 

Function Documentation

◆ linux_pwm_out_main()

int linux_pwm_out_main ( int  argc,
char *  argv[] 
)

gets the parameters for the esc's pwm

Definition at line 511 of file linux_pwm_out.cpp.

References linux_pwm_out::_device, linux_pwm_out::_is_running, linux_pwm_out::_max_num_outputs, linux_pwm_out::_mixer_filename, linux_pwm_out::_protocol, linux_pwm_out::_pwm_disarmed, linux_pwm_out::_pwm_max, linux_pwm_out::_pwm_min, param_find(), param_get(), linux_pwm_out::start(), linux_pwm_out::stop(), and linux_pwm_out::usage().

Referenced by linux_pwm_out::usage().

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