@@ -37,23 +37,44 @@ void SSD1306_OLEDDisplay_Mux::begin() {
3737 _expander->closeChannel (_expanderChannel);
3838}
3939
40- void SSD1306_OLEDDisplay_Mux::writeBig (String msg) {
40+ void SSD1306_OLEDDisplay_Mux::drawImage (
41+ int16_t xMove, int16_t yMove, int16_t width, int16_t height,
42+ const uint8_t *xbm, bool clear_display
43+ ) {
4144 _expander->openChannel (_expanderChannel);
4245
43- _display->clear ();
44- _display->drawString (64 , 0 , msg);
46+ if (clear_display) {
47+ _display->clear ();
48+ }
49+ _display->drawXbm (xMove, yMove, width, height, xbm);
4550 _display->display ();
4651
4752 _expander->closeChannel (_expanderChannel);
4853}
4954
50- void SSD1306_OLEDDisplay_Mux::writeSmall (String msg) {
55+ void SSD1306_OLEDDisplay_Mux::writeBig (String msg, int16_t x, int16_t y, bool clear_display ) {
5156 _expander->openChannel (_expanderChannel);
5257
53- _display->clear ();
58+ if (clear_display) {
59+ _display->clear ();
60+ }
61+ _display->setFont (Arimo_Regular_30);
62+
63+ _display->drawString (x, y, msg);
64+ _display->display ();
65+
66+ _expander->closeChannel (_expanderChannel);
67+ }
68+
69+ void SSD1306_OLEDDisplay_Mux::writeSmall (String msg, int16_t x, int16_t y, bool clear_display) {
70+ _expander->openChannel (_expanderChannel);
71+
72+ if (clear_display) {
73+ _display->clear ();
74+ }
5475 _display->setFont (Arimo_Regular_20);
5576
56- _display->drawString (64 , 4 , msg);
77+ _display->drawString (x, y , msg);
5778 _display->display ();
5879
5980 _expander->closeChannel (_expanderChannel);
0 commit comments