Notifications using pixel control.
More...
#include <SimWheelTypes.hpp>
|
| | PixelControlNotification () |
| | Initialize.
|
| |
| void | show (PixelGroup group) noexcept |
| | Show pixels all at once in a specific group.
|
| |
|
void | show () noexcept |
| | Show pixels all at once in all groups.
|
| |
| bool | renderBatteryLevel (uint32_t barColor=0x00ACFA70) |
| | Macro to render the current battery SoC.
|
| |
| uint32_t | frameTimer (uint32_t &timerVariable, uint32_t elapsedTimeMs, uint32_t timeLimitMs) |
| | Simple timer.
|
| |
|
| static void | reset () noexcept |
| | Show all pixels in black in all groups all at once.
|
| |
| static uint8_t | getPixelCount (PixelGroup group) noexcept |
| | Get the count of pixels in a pixel group.
|
| |
Notifications using pixel control.
- Note
- All methods are called in a separate low-priority thread
Definition at line 1750 of file SimWheelTypes.hpp.
◆ PixelControlNotification()
| PixelControlNotification::PixelControlNotification |
( |
| ) |
|
|
inlineprotected |
◆ getInstance()
Get the singleton instance.
- Returns
- PixelControlNotification* Singleton instance
Definition at line 1837 of file SimWheelTypes.hpp.
◆ getPixelCount()
| static uint8_t PixelControlNotification::getPixelCount |
( |
PixelGroup | group | ) |
|
|
staticprotectednoexcept |
Get the count of pixels in a pixel group.
- Parameters
-
- Returns
- uint8_t The count of pixels or zero if the group was not configured.
◆ pixelControl_OnBitePoint()
| virtual void PixelControlNotification::pixelControl_OnBitePoint |
( |
uint8_t | bitePoint | ) |
|
|
virtual |
Notify a change in current bite point.
- Parameters
-
| bitePoint | Last known bite point. |
◆ pixelControl_OnBLEdiscovering()
| virtual void PixelControlNotification::pixelControl_OnBLEdiscovering |
( |
| ) |
|
|
virtual |
Notify device is in discovery mode.
- Note
- Not called in the USB implementation.
◆ pixelControl_OnConnected()
| virtual void PixelControlNotification::pixelControl_OnConnected |
( |
| ) |
|
|
virtual |
Notify device is connected.
- Note
- Called in a low priority thread.
◆ pixelControl_OnLowBattery()
| virtual void PixelControlNotification::pixelControl_OnLowBattery |
( |
| ) |
|
|
virtual |
Notify low battery.
- Note
- Called at timed intervals while the low battery condition persists.
◆ renderBatteryLevel()
| bool PixelControlNotification::renderBatteryLevel |
( |
uint32_t | barColor = 0x00ACFA70 | ) |
|
|
protected |
Macro to render the current battery SoC.
- Note
- Does nothing if there is no battery. Pixels are rendered, but not shown yet.
- Parameters
-
| barColor | Packed RGB color to use in the percentage bar. |
- Returns
- True if there is a battery.
-
False if there is no battery.
◆ reset()
| static void PixelControlNotification::reset |
( |
| ) |
|
|
staticprotectednoexcept |
Show all pixels in black in all groups all at once.
- Note
- Does not overwrite pixel vector members
◆ show()
| void PixelControlNotification::show |
( |
PixelGroup | group | ) |
|
|
protectednoexcept |
Show pixels all at once in a specific group.
- Parameters
-
◆ backlit_button_pixel
| ::std::vector<Pixel> PixelControlNotification::backlit_button_pixel {} |
|
protected |
◆ individual_pixel
| ::std::vector<Pixel> PixelControlNotification::individual_pixel {} |
|
protected |
◆ notConnectedYet
| bool PixelControlNotification::notConnectedYet = true |
|
protected |
Flag to indicate host connection.
- Note
- True on startup or connection loss. False after a connection is established. For read only. Do not overwrite.
Definition at line 1787 of file SimWheelTypes.hpp.
◆ telemetry_pixel
| ::std::vector<Pixel> PixelControlNotification::telemetry_pixel {} |
|
protected |
The documentation for this class was generated from the following file: