![]() |
OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
|
Use eight single-color LEDS as "rev lights". More...
#include <SimWheelUI.hpp>
Public Member Functions | |
| PCF8574RevLights (uint8_t hardwareAddress, I2CBus bus=I2CBus::SECONDARY, uint8_t factoryAddress=0b0100000, RevLightsMode displayMode=RevLightsMode::LEFT_TO_RIGHT) | |
| Create "rev lights" using PCF8574 and single-color LEDs. | |
| virtual void | onStart () override |
| Called just once after initialization. | |
| virtual void | onConnected () override |
| Notify device is connected. | |
| virtual void | onTelemetryData (const TelemetryData *pTelemetryData) override |
| Notify new telemetry data. | |
| virtual void | serveSingleFrame (uint32_t elapsedMs) override |
| Draw a single frame. | |
| virtual void | onBitePoint (uint8_t bitePoint) override |
| Notify a change in the current bite point. | |
| virtual void | onLowBattery () override |
| Notify low battery. | |
| virtual void | onSaveSettings () override |
| Notify that user settings have been saved to flash memory. | |
| virtual void | shutdown () override |
| Cut power to the UI hardware. | |
| virtual uint8_t | getMaxFPS () override |
| Get the maximum FPS supported by the underlying hardware. | |
| virtual uint16_t | getStackSize () override |
| Get the stack size required by this user interface. | |
Public Member Functions inherited from AbstractUserInterface | |
| AbstractUserInterface (const AbstractUserInterface &)=delete | |
| AbstractUserInterface & | operator= (const AbstractUserInterface &)=delete |
| virtual void | onBLEdiscovering () |
| Notify device is in discovery mode. | |
Additional Inherited Members | |
Public Attributes inherited from AbstractUserInterface | |
| bool | requiresPowertrainTelemetry = false |
| Set to true to receive and use powertrain telemetry data. | |
| bool | requiresECUTelemetry = false |
| Set to true to receive and use ECU telemetry data. | |
| bool | requiresRaceControlTelemetry = false |
| Set to true to receive and use race control telemetry data. | |
| bool | requiresGaugeTelemetry = false |
| Set to true to receive and use telemetry data for gauges. | |
Protected Member Functions inherited from AbstractUserInterface | |
| uint32_t | frameTimer (uint32_t &timerVariable, uint32_t elapsedTimeMs, uint32_t timeLimitMs) |
| Simple timer. | |
Use eight single-color LEDS as "rev lights".
Definition at line 82 of file SimWheelUI.hpp.
| PCF8574RevLights::PCF8574RevLights | ( | uint8_t | hardwareAddress, |
| I2CBus | bus = I2CBus::SECONDARY, | ||
| uint8_t | factoryAddress = 0b0100000, | ||
| RevLightsMode | displayMode = RevLightsMode::LEFT_TO_RIGHT ) |
Create "rev lights" using PCF8574 and single-color LEDs.
| hardwareAddress | An I2C hardware address (3 bits), as configured using pins A0, A1 and A2. |
| bus | I2C bus. |
| factoryAddress | Fixed factory-defined part of the full I2C address (7 bits). |
| displayMode | Display mode. |
|
inlineoverridevirtual |
Get the maximum FPS supported by the underlying hardware.
Reimplemented from AbstractUserInterface.
Definition at line 110 of file SimWheelUI.hpp.
|
inlineoverridevirtual |
Get the stack size required by this user interface.
Reimplemented from AbstractUserInterface.
Definition at line 111 of file SimWheelUI.hpp.
|
overridevirtual |
Notify a change in the current bite point.
| bitePoint | Last known bite point. |
Reimplemented from AbstractUserInterface.
|
overridevirtual |
Notify device is connected.
Reimplemented from AbstractUserInterface.
|
overridevirtual |
Notify low battery.
Reimplemented from AbstractUserInterface.
|
overridevirtual |
Notify that user settings have been saved to flash memory.
Reimplemented from AbstractUserInterface.
|
overridevirtual |
Called just once after initialization.
Reimplemented from AbstractUserInterface.
|
overridevirtual |
Notify new telemetry data.
| pTelemetryData | Pointer to telemetry data. Can be null. Safe to store for later use. |
pTelemetryData is null when no telemetry data has been received in the previous two seconds. May be used to turn the display off.Reimplemented from AbstractUserInterface.
|
overridevirtual |
Draw a single frame.
| elapsedMs | Elapsed milliseconds since last call. |
Reimplemented from AbstractUserInterface.
|
overridevirtual |
Cut power to the UI hardware.
Reimplemented from AbstractUserInterface.