Class OpenSkyhawk::HIDHatSwitch
ClassList > OpenSkyhawk > HIDHatSwitch
HID hat switch handler. Declared at sketch scope for each hat switch. More...
#include <SimGateway.h>
Public Functions
| Type | Name |
|---|---|
| HIDHatSwitch (uint16_t controlId, uint8_t hatIndex) Register a HID hat switch handler. |
|
| uint16_t | controlId () const |
| void | dispatch (uint16_t value) Dispatch a direction to the hat switch. |
| HIDHatSwitch * | next () const |
Public Static Functions
| Type | Name |
|---|---|
| HIDHatSwitch * | head () |
Detailed Description
Self-registers into a static linked list at construction. Dispatches to OsJoystick.setHat() with direction clamped to 0–8.
Public Functions Documentation
function HIDHatSwitch
Register a HID hat switch handler.
OpenSkyhawk::HIDHatSwitch::HIDHatSwitch (
uint16_t controlId,
uint8_t hatIndex
)
Parameters:
controlIdCTRL_* constant from HIDControls.h (0x0020–0x002F range).hatIndexOpenSkyhawkJoystick hat index (0–3).
function controlId
uint16_t OpenSkyhawk::HIDHatSwitch::controlId () const
function dispatch
Dispatch a direction to the hat switch.
void OpenSkyhawk::HIDHatSwitch::dispatch (
uint16_t value
)
Parameters:
value0 = centered, 1 = N, 2 = NE, 3 = E, 4 = SE, 5 = S, 6 = SW, 7 = W, 8 = NW. Values > 8 → centered.
function next
HIDHatSwitch * OpenSkyhawk::HIDHatSwitch::next () const
Public Static Functions Documentation
function head
static HIDHatSwitch * OpenSkyhawk::HIDHatSwitch::head ()
The documentation for this class was generated from the following file Firmware/Libraries/SimGateway/SimGateway.h