diff --git a/src/display/Display.cpp b/src/display/Display.cpp index 9fe39da..9e687d5 100644 --- a/src/display/Display.cpp +++ b/src/display/Display.cpp @@ -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"); diff --git a/src/display/Display.h b/src/display/Display.h index 6cdc230..15774a4 100644 --- a/src/display/Display.h +++ b/src/display/Display.h @@ -86,6 +86,21 @@ class Display{ * @param value the string that should be printed */ 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