Skip to content

Commit 002badc

Browse files
author
Kirk
committed
text() method now supports Arduino strings
1 parent 43b391b commit 002badc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/SparkFun_Qwiic_OLED.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,11 @@ class QwiicOLEDBaseClass : public Print { // NOTE: implementing Arduino Print
582582
void text(uint8_t x0, uint8_t y0, const char * text, uint8_t clr=COLOR_WHITE){
583583
_device.text(x0, y0, text, clr);
584584
}
585+
586+
void text(uint8_t x0, uint8_t y0, String &text, uint8_t clr=COLOR_WHITE){
587+
588+
_device.text(x0, y0, text.c_str(), clr);
589+
}
585590

586591
///////////////////////////////////////////////////////////////////////
587592
// Methods to support Arduino Print capability

0 commit comments

Comments
 (0)