PX4 Firmware
PX4 Autopilot Software http://px4.io
|
UAVCAN mixing class. More...
#include <uavcan_main.hpp>
Public Member Functions | |
UavcanMixingInterface (pthread_mutex_t &node_mutex, UavcanEscController &esc_controller) | |
bool | updateOutputs (bool stop_motors, uint16_t outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override |
Callback to update the (physical) actuator outputs in the driver. More... | |
void | mixerChanged () override |
called whenever the mixer gets updated/reset More... | |
MixingOutput & | mixingOutput () |
Public Member Functions inherited from OutputModuleInterface | |
OutputModuleInterface (const char *name, const px4::wq_config_t &config) | |
Protected Member Functions | |
void | Run () override |
Private Attributes | |
pthread_mutex_t & | _node_mutex |
UavcanEscController & | _esc_controller |
MixingOutput | _mixing_output {MAX_ACTUATORS, *this, MixingOutput::SchedulingPolicy::Auto, false, false} |
Friends | |
class | UavcanNode |
Additional Inherited Members | |
Static Public Attributes inherited from OutputModuleInterface | |
static constexpr int | MAX_ACTUATORS = PWM_OUTPUT_MAX_CHANNELS |
UAVCAN mixing class.
It is separate from UavcanNode to have 2 WorkItems and therefore allowing independent scheduling (I.e. UavcanMixingInterface runs upon actuator_control updates, whereas UavcanNode runs at a fixed rate or upon bus updates). Both work items are expected to run on the same work queue.
Definition at line 80 of file uavcan_main.hpp.
|
inline |
Definition at line 83 of file uavcan_main.hpp.
References OutputModuleInterface::MAX_ACTUATORS, mixerChanged(), and updateOutputs().
|
overridevirtual |
called whenever the mixer gets updated/reset
Reimplemented from OutputModuleInterface.
Definition at line 900 of file uavcan_main.cpp.
References UavcanNode::_esc_controller, and UavcanEscController::set_rotor_count().
Referenced by UavcanMixingInterface().
|
inline |
Definition at line 93 of file uavcan_main.hpp.
References _mixing_output, and Run().
Referenced by UavcanNode::enable_idle_throttle_when_armed(), UavcanNode::init(), UavcanNode::ioctl(), UavcanNode::print_info(), and UavcanNode::Run().
|
overrideprotected |
Definition at line 892 of file uavcan_main.cpp.
References UavcanNode::_node_mutex.
Referenced by UavcanNode::attachITxQueueInjector(), and mixingOutput().
|
overridevirtual |
Callback to update the (physical) actuator outputs in the driver.
stop_motors | if true, all motors must be stopped (if false, individual motors might still be stopped via outputs[i] == disarmed_value) |
outputs | individual actuator outputs in range [min, max] or failsafe/disarmed value |
num_outputs | number of outputs (<= max_num_outputs) |
num_control_groups_updated | number of actuator_control groups updated |
Implements OutputModuleInterface.
Definition at line 885 of file uavcan_main.cpp.
References UavcanNode::_esc_controller, and UavcanEscController::update_outputs().
Referenced by UavcanMixingInterface().
|
friend |
Definition at line 98 of file uavcan_main.hpp.
|
private |
Definition at line 100 of file uavcan_main.hpp.
|
private |
Definition at line 101 of file uavcan_main.hpp.
Referenced by mixingOutput().
|
private |
Definition at line 99 of file uavcan_main.hpp.