Skip to content

Commit

Permalink
Use Print class write members
Browse files Browse the repository at this point in the history
  • Loading branch information
greiman committed Jan 27, 2019
1 parent 6d277c2 commit bef9362
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SSD1306Ascii
version=1.2.2
version=1.2.3
author=Bill Greiman <fat16lib@sbcglobal.net>
maintainer=Bill Greiman <fat16lib@sbcglobal.net>
sentence=Text display on small momochrome OLED modules.
Expand Down
8 changes: 0 additions & 8 deletions src/SSD1306Ascii.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
8 changes: 1 addition & 7 deletions src/SSD1306Ascii.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ inline void oledReset(uint8_t rst) {
*/
class SSD1306Ascii : public Print {
public:
using Print::write;
SSD1306Ascii() {}
#if INCLUDE_SCROLLING
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit bef9362

Please sign in to comment.