ClusterDuck Protocol
|
Internal OLED Display abstraction. More...
#include <DuckDisplay.h>
Public Member Functions | |
void | setupDisplay () |
Initialize the display component. | |
void | powerSave (bool save) |
Toggle the display in or out of power saving mode. More... | |
void | drawString (uint8_t x, uint8_t y, const char *text) |
Draw a string at the given coordinates. More... | |
void | drawString (bool cls, uint8_t x, uint8_t y, const char *text) |
Draw a string at the given coordinates. More... | |
void | setCursor (uint8_t x, uint8_t y) |
Set the cursor to the given position on the screen. More... | |
void | print (String text) |
Print a string at the current cursor position. More... | |
void | clear (void) |
Clear the screen. | |
Static Public Member Functions | |
static DuckDisplay * | getInstance () |
Get the Singletom instance of the DuckDisplay class. More... | |
Internal OLED Display abstraction.
Provides internal access to the OLED Display, so CDP can show useful status information about the network and the device.
void DuckDisplay::drawString | ( | bool | cls, |
uint8_t | x, | ||
uint8_t | y, | ||
const char * | text | ||
) |
Draw a string at the given coordinates.
cls | when set to true, will clear the screen, before drawing |
x | value of X coordinate |
y | value of Y coordinate |
text | string to draw |
void DuckDisplay::drawString | ( | uint8_t | x, |
uint8_t | y, | ||
const char * | text | ||
) |
Draw a string at the given coordinates.
x | value of X coordinate |
y | value of Y coordinate |
text | string to draw |
|
static |
Get the Singletom instance of the DuckDisplay class.
void DuckDisplay::powerSave | ( | bool | save | ) |
Toggle the display in or out of power saving mode.
save | Set to true to enable power saving, false to disable |
void DuckDisplay::print | ( | String | text | ) |
Print a string at the current cursor position.
text | string to draw |
void DuckDisplay::setCursor | ( | uint8_t | x, |
uint8_t | y | ||
) |
Set the cursor to the given position on the screen.
x | X coordinate value |
y | Y coordinate value |