Class OpenSkyhawk::OutputBase
ClassList > OpenSkyhawk > OutputBase
Abstract base for all DCS-driven output objects. More...
#include <PanelGroup.h>
Inherited by the following classes: OpenSkyhawk::DrumDisplay, OpenSkyhawk::LED, OpenSkyhawk::NeedleGauge
Public Functions
| Type | Name |
|---|---|
| virtual void | configure () Configure hardware pins for this output. |
| OutputBase * | next () const Next output in the list; nullptr at end. |
| virtual void | onControlPacket (uint16_t controlId, uint16_t value) = 0 Called for every non-null ControlPacket in a CTRL_BCAST frame. |
| virtual void | update () Called every PanelGroup::loop() iteration. |
Public Static Functions
| Type | Name |
|---|---|
| OutputBase * | head () Head of the self-registered linked list. |
Protected Functions
| Type | Name |
|---|---|
| OutputBase () Registers this instance into the linked list. |
Detailed Description
Declare concrete output objects at global scope; the constructor self-registers into a static linked list. PanelGroup::setup() calls configure() after chip initialisation. PanelGroup::loop() calls onControlPacket() for every non-null slot in each received CTRL_BCAST frame and calls update() every iteration.
Public Functions Documentation
function configure
Configure hardware pins for this output.
inline virtual void OpenSkyhawk::OutputBase::configure ()
Called by PanelGroup::setup() after chip.init() completes. Call _pin.configureAsOutput() here. Default is a no-op.
function next
Next output in the list; nullptr at end.
OutputBase * OpenSkyhawk::OutputBase::next () const
function onControlPacket
Called for every non-null ControlPacket in a CTRL_BCAST frame.
virtual void OpenSkyhawk::OutputBase::onControlPacket (
uint16_t controlId,
uint16_t value
) = 0
Parameters:
controlIdDCS-BIOS output address from the received packet.value16-bit value from DCS-BIOS.
function update
Called every PanelGroup::loop() iteration.
inline virtual void OpenSkyhawk::OutputBase::update ()
Default is a no-op. Override for outputs that need continuous work between CAN frames (stepper motor step generation, PWM updates).
Public Static Functions Documentation
function head
Head of the self-registered linked list.
static OutputBase * OpenSkyhawk::OutputBase::head ()
Protected Functions Documentation
function OutputBase
Registers this instance into the linked list.
OpenSkyhawk::OutputBase::OutputBase ()
The documentation for this class was generated from the following file Firmware/Libraries/PanelGroup/PanelGroup.h