add print int function to display

This commit is contained in:
Anton Jacker 2024-06-13 14:06:55 +02:00
parent 215155035e
commit c40930537a
No known key found for this signature in database
GPG Key ID: 6581AFF52DAA87AC
2 changed files with 27 additions and 0 deletions

View File

@ -137,6 +137,18 @@ void Display::println(String value){
this->println(msgBuffer);
};
void Display::print(int value){
char cstr[16];
this->print(itoa(value, cstr, 10));
};
void Display::println(int value){
char cstr[16];
this->println(itoa(value, cstr, 10));
};
void Display::println(char *value){
this ->print(value);
this->print("\n");

View File

@ -87,6 +87,21 @@ class Display{
*/
void println(String value);
/**
* @brief prints the passed string right behind the current displaycontent
* the sequence "\n" can be used to make a linebreak on the display
*
* @param value the string "xyz" that should be printed to the display
*/
void print(int value);
/**
* @brief same as the print method, but after the string a line break is inserted
*
* @param value the string that should be printed
*/
void println(int value);
/**
* @brief string to char
*