PX4 Firmware
PX4 Autopilot Software http://px4.io
OutputModuleInterface Class Referenceabstract

Base class for an output module. More...

#include <mixer_module.hpp>

Inheritance diagram for OutputModuleInterface:
Collaboration diagram for OutputModuleInterface:

Public Member Functions

 OutputModuleInterface (const char *name, const px4::wq_config_t &config)
 
virtual bool updateOutputs (bool stop_motors, uint16_t outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)=0
 Callback to update the (physical) actuator outputs in the driver. More...
 
virtual void mixerChanged ()
 called whenever the mixer gets updated/reset More...
 

Static Public Attributes

static constexpr int MAX_ACTUATORS = PWM_OUTPUT_MAX_CHANNELS
 

Detailed Description

Base class for an output module.

Definition at line 59 of file mixer_module.hpp.

Constructor & Destructor Documentation

◆ OutputModuleInterface()

OutputModuleInterface::OutputModuleInterface ( const char *  name,
const px4::wq_config_t &  config 
)
inline

Definition at line 64 of file mixer_module.hpp.

References updateOutputs().

Here is the call graph for this function:

Member Function Documentation

◆ mixerChanged()

virtual void OutputModuleInterface::mixerChanged ( )
inlinevirtual

called whenever the mixer gets updated/reset

Reimplemented in DShotOutput, and UavcanMixingInterface.

Definition at line 80 of file mixer_module.hpp.

Referenced by MixingOutput::loadMixer(), and MixingOutput::resetMixer().

Here is the caller graph for this function:

◆ updateOutputs()

virtual bool OutputModuleInterface::updateOutputs ( bool  stop_motors,
uint16_t  outputs[MAX_ACTUATORS],
unsigned  num_outputs,
unsigned  num_control_groups_updated 
)
pure virtual

Callback to update the (physical) actuator outputs in the driver.

Parameters
stop_motorsif true, all motors must be stopped (if false, individual motors might still be stopped via outputs[i] == disarmed_value)
outputsindividual actuator outputs in range [min, max] or failsafe/disarmed value
num_outputsnumber of outputs (<= max_num_outputs)
num_control_groups_updatednumber of actuator_control groups updated
Returns
if true, the update got handled, and actuator_outputs can be published

Implemented in PX4FMU, DShotOutput, UavcanMixingInterface, and PWMSim.

Referenced by OutputModuleInterface(), and MixingOutput::update().

Here is the caller graph for this function:

Member Data Documentation

◆ MAX_ACTUATORS

constexpr int OutputModuleInterface::MAX_ACTUATORS = PWM_OUTPUT_MAX_CHANNELS
static

Definition at line 62 of file mixer_module.hpp.

Referenced by PWMSim::ioctl(), and UavcanMixingInterface::UavcanMixingInterface().


The documentation for this class was generated from the following file: