ClusterDuck Protocol
Public Member Functions | Static Public Member Functions | List of all members
DuckDisplay Class Reference

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 DuckDisplaygetInstance ()
 Get the Singletom instance of the DuckDisplay class. More...
 

Detailed Description

Internal OLED Display abstraction.

Provides internal access to the OLED Display, so CDP can show useful status information about the network and the device.

Member Function Documentation

◆ drawString() [1/2]

void DuckDisplay::drawString ( bool  cls,
uint8_t  x,
uint8_t  y,
const char *  text 
)

Draw a string at the given coordinates.

Parameters
clswhen set to true, will clear the screen, before drawing
xvalue of X coordinate
yvalue of Y coordinate
textstring to draw

◆ drawString() [2/2]

void DuckDisplay::drawString ( uint8_t  x,
uint8_t  y,
const char *  text 
)

Draw a string at the given coordinates.

Parameters
xvalue of X coordinate
yvalue of Y coordinate
textstring to draw

◆ getInstance()

DuckDisplay * DuckDisplay::getInstance ( )
static

Get the Singletom instance of the DuckDisplay class.

Returns
A pointer to a DuckDisplay object.

◆ powerSave()

void DuckDisplay::powerSave ( bool  save)

Toggle the display in or out of power saving mode.

Parameters
saveSet to true to enable power saving, false to disable

◆ print()

void DuckDisplay::print ( String  text)

Print a string at the current cursor position.

Parameters
textstring to draw

◆ setCursor()

void DuckDisplay::setCursor ( uint8_t  x,
uint8_t  y 
)

Set the cursor to the given position on the screen.

Parameters
xX coordinate value
yY coordinate value

The documentation for this class was generated from the following files: