|
API Documentation v0.0.1
|
Public Member Functions | |
| void | setupRotaryEncoder (int encSwPin, int encAPin, int encBPin) |
| Sets up the rotary encoder with switch and encoder pins. | |
| void | registerChannel (Channel *channel) |
| Registers a channel with the board. | |
| void | updateLeds () |
| Update the physical LED state. | |
| int | handleModeChange () |
| Handles mode change button press and returns current mode. | |
| void | processMode () |
| Processes the current mode. | |
| void | fillSolid (const CRGB &color, int brightness=-1) |
| Fills all channels with a solid color. | |
| void | setAllLightsOff () |
| Turns off all lights in all channels and resets brightness state. | |
| void | updateInstrumentLights (uint16_t newValue) |
| Updates all channels with new instrument lighting value. | |
| void | updateConsoleLights (uint16_t newValue) |
| Updates all channels with new console lighting value. | |
| void | updateFloodLights (uint16_t newValue) |
| Updates all channels with new flood lighting value. | |
Static Public Member Functions | |
| static Board * | getInstance () |
| Gets or createsthe singleton instance of the Board class. | |
| static void | onInstrIntLtChange (unsigned int newValue) |
| Callback for instrument lighting changes from DCS-BIOS. | |
| static void | onConsolesDimmerChange (unsigned int newValue) |
| Callback for console dimmer changes from DCS-BIOS. | |
| static void | onFloodDimmerChange (unsigned int newValue) |
| Callback for flood lighting changes from DCS-BIOS. | |
Public Attributes | |
| DcsBios::IntegerBuffer | instrIntLtBuffer {FA_18C_hornet_INSTR_INT_LT, onInstrIntLtChange} |
| DcsBios::IntegerBuffer | consolesDimmerBuffer {FA_18C_hornet_CONSOLES_DIMMER, onConsolesDimmerChange} |
| DcsBios::IntegerBuffer | floodDimmerBuffer {FA_18C_hornet_FLOOD_DIMMER, onFloodDimmerChange} |
|
inlinestatic |
Gets or createsthe singleton instance of the Board class.
|
inline |
Sets up the rotary encoder with switch and encoder pins.
| encSwPin | Pin number for the encoder switch |
| encAPin | Pin number for encoder A |
| encBPin | Pin number for encoder B |
Definition at line 106 of file Board.h.
|
inline |
Registers a channel with the board.
| channel | Pointer to the channel to register |
Definition at line 117 of file Board.h.
|
inline |
Update the physical LED state.
Definition at line 125 of file Board.h.
References LedUpdateState::getInstance(), and LedUpdateState::setUpdateFlag().
|
inline |
Handles mode change button press and returns current mode.
Definition at line 144 of file Board.h.
References fillSolid(), and setAllLightsOff().
|
inline |
Processes the current mode.
Definition at line 190 of file Board.h.
References fillSolid(), getDcsState(), LedUpdateState::getInstance(), setAllLightsOff(), LedUpdateState::setUpdateFlag(), Channel::updateConsoleLights(), Channel::updateFloodLights(), and Channel::updateInstrLights().
|
inline |
Fills all channels with a solid color.
| color | The color to fill with |
| brightness | Optional brightness value (0-255). If not provided, uses current brightness |
Definition at line 257 of file Board.h.
References LedUpdateState::getInstance(), LedUpdateState::setUpdateFlag(), Channel::updateConsoleLights(), and Channel::updateInstrLights().
Referenced by handleModeChange(), and processMode().
|
inline |
Turns off all lights in all channels and resets brightness state.
Definition at line 270 of file Board.h.
References LedUpdateState::getInstance(), Channel::setAllLightsOff(), and LedUpdateState::setUpdateFlag().
Referenced by handleModeChange(), and processMode().
|
inline |
Updates all channels with new instrument lighting value.
| newValue | The new brightness value |
Definition at line 282 of file Board.h.
References LedUpdateState::getInstance(), LedUpdateState::setUpdateFlag(), and Channel::updateInstrLights().
Referenced by onInstrIntLtChange().
|
inline |
Updates all channels with new console lighting value.
| newValue | The new brightness value |
Definition at line 297 of file Board.h.
References LedUpdateState::getInstance(), LedUpdateState::setUpdateFlag(), and Channel::updateConsoleLights().
Referenced by onConsolesDimmerChange().
|
inline |
Updates all channels with new flood lighting value.
| newValue | The new brightness value |
Definition at line 312 of file Board.h.
References LedUpdateState::getInstance(), LedUpdateState::setUpdateFlag(), and Channel::updateFloodLights().
Referenced by onFloodDimmerChange().
|
inlinestatic |
Callback for instrument lighting changes from DCS-BIOS.
| newValue | The new brightness value from DCS-BIOS |
Definition at line 328 of file Board.h.
References updateInstrumentLights().
|
inlinestatic |
Callback for console dimmer changes from DCS-BIOS.
| newValue | The new brightness value from DCS-BIOS |
Definition at line 338 of file Board.h.
References updateConsoleLights().
|
inlinestatic |
Callback for flood lighting changes from DCS-BIOS.
| newValue | The new brightness value from DCS-BIOS |
Definition at line 348 of file Board.h.
References updateFloodLights().
| DcsBios::IntegerBuffer Board::instrIntLtBuffer {FA_18C_hornet_INSTR_INT_LT, onInstrIntLtChange} |
Definition at line 331 of file Board.h.
| DcsBios::IntegerBuffer Board::consolesDimmerBuffer {FA_18C_hornet_CONSOLES_DIMMER, onConsolesDimmerChange} |
Definition at line 341 of file Board.h.
| DcsBios::IntegerBuffer Board::floodDimmerBuffer {FA_18C_hornet_FLOOD_DIMMER, onFloodDimmerChange} |
Definition at line 351 of file Board.h.