Dezibot 4
|
#include <Display.h>
Public Member Functions | |
void | begin (void) |
initializes the display datastructures and sents the required cmds to start the display. Should only be called once. | |
void | clear (void) |
delets all content from the display, resets the linecounter, new print will start at the top left. Orientationflip is not resetted | |
void | print (char *value) |
prints the passed string right behind the current displaycontent the sequence "\n" can be used to make a linebreak on the display | |
void | println (char *value) |
same as the print method, but after the string a line break is inserted | |
void | print (String value) |
prints the passed string right behind the current displaycontent the sequence "\n" can be used to make a linebreak on the display | |
void | println (String value) |
same as the print method, but after the string a line break is inserted | |
void | print (int value) |
prints the passed string right behind the current displaycontent the sequence "\n" can be used to make a linebreak on the display | |
void | println (int value) |
same as the print method, but after the string a line break is inserted | |
char | stringToCharArray (String value) |
string to char | |
void | flipOrientation (void) |
flips the horizontal orientation of all content on the display | |
void | invertColor (void) |
inverts the pixelcolors, so pixels on will be set to off and currently off pixels will be turned off. affects already printed content as well as future prints. | |
Protected Member Functions | |
void | sendDisplayCMD (uint8_t cmd) |
sends the passed cmd to the display, cmd_byte is added as prefix by the function | |
void | updateLine (uint charAmount) |
should be called whenever characters where printed to the display. Updates the data of the class to handle linebreaks correctly | |
Protected Attributes | |
uint8_t | charsOnCurrLine = 0 |
uint8_t | currLine = 0 |
bool | orientationFlipped = false |
bool | colorInverted = false |
void Display::begin | ( | void | ) |
initializes the display datastructures and sents the required cmds to start the display. Should only be called once.
Definition at line 16 of file Display.cpp.
void Display::clear | ( | void | ) |
delets all content from the display, resets the linecounter, new print will start at the top left. Orientationflip is not resetted
Definition at line 44 of file Display.cpp.
void Display::flipOrientation | ( | void | ) |
flips the horizontal orientation of all content on the display
Definition at line 157 of file Display.cpp.
void Display::invertColor | ( | void | ) |
inverts the pixelcolors, so pixels on will be set to off and currently off pixels will be turned off. affects already printed content as well as future prints.
Definition at line 168 of file Display.cpp.
void Display::print | ( | char * | value | ) |
prints the passed string right behind the current displaycontent the sequence "\n" can be used to make a linebreak on the display
value | the string "xyz" that should be printed to the display |
Definition at line 79 of file Display.cpp.
void Display::print | ( | int | value | ) |
prints the passed string right behind the current displaycontent the sequence "\n" can be used to make a linebreak on the display
value | the string "xyz" that should be printed to the display |
Definition at line 140 of file Display.cpp.
void Display::print | ( | String | value | ) |
prints the passed string right behind the current displaycontent the sequence "\n" can be used to make a linebreak on the display
value | the string "xyz" that should be printed to the display |
Definition at line 124 of file Display.cpp.
void Display::println | ( | char * | value | ) |
same as the print method, but after the string a line break is inserted
value | the string that should be printed |
Definition at line 152 of file Display.cpp.
void Display::println | ( | int | value | ) |
same as the print method, but after the string a line break is inserted
value | the string that should be printed |
Definition at line 146 of file Display.cpp.
void Display::println | ( | String | value | ) |
same as the print method, but after the string a line break is inserted
value | the string that should be printed |
Definition at line 132 of file Display.cpp.
|
protected |
sends the passed cmd to the display, cmd_byte is added as prefix by the function
cmd | the byte instruction that shold by sent |
Definition at line 37 of file Display.cpp.
char Display::stringToCharArray | ( | String | value | ) |
string to char
value | the string that should be converted to char |
Definition at line 115 of file Display.cpp.
|
protected |
should be called whenever characters where printed to the display. Updates the data of the class to handle linebreaks correctly
charAmount | How many characters where added to the screen |
Definition at line 66 of file Display.cpp.