From bef9362f53f0cfeb7c6fd76ab6d045e268a1e877 Mon Sep 17 00:00:00 2001 From: Bill Greiman Date: Sun, 27 Jan 2019 09:06:11 -0800 Subject: [PATCH] Use Print class write members --- library.properties | 2 +- src/SSD1306Ascii.cpp | 8 -------- src/SSD1306Ascii.h | 8 +------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/library.properties b/library.properties index c7ae1aa..80a273d 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SSD1306Ascii -version=1.2.2 +version=1.2.3 author=Bill Greiman maintainer=Bill Greiman sentence=Text display on small momochrome OLED modules. diff --git a/src/SSD1306Ascii.cpp b/src/SSD1306Ascii.cpp index e24e528..dc49fb6 100644 --- a/src/SSD1306Ascii.cpp +++ b/src/SSD1306Ascii.cpp @@ -284,11 +284,3 @@ size_t SSD1306Ascii::write(uint8_t ch) { setRow(srow); return 1; } -//------------------------------------------------------------------------------ -size_t SSD1306Ascii::write(const char* s) { - size_t n = strlen(s); - for (size_t i = 0; i < n; i++) { - write(s[i]); - } - return n; -} diff --git a/src/SSD1306Ascii.h b/src/SSD1306Ascii.h index 69ddc04..5ed2106 100644 --- a/src/SSD1306Ascii.h +++ b/src/SSD1306Ascii.h @@ -86,6 +86,7 @@ inline void oledReset(uint8_t rst) { */ class SSD1306Ascii : public Print { public: + using Print::write; SSD1306Ascii() {} #if INCLUDE_SCROLLING //------------------------------------------------------------------------------ @@ -367,13 +368,6 @@ class SSD1306Ascii : public Print { * @return the value one. */ size_t write(uint8_t c); - /** - * @brief Display a string. - * - * @param[in] s The string to display. - * @return The length of the string. - */ - size_t write(const char* s); protected: uint16_t fontSize() const;