adafruit / Adafruit_EPD

e-paper display driver for Arduino
140 stars 57 forks source link

setCursor not working properly. #10

Closed tavdog closed 5 years ago

tavdog commented 5 years ago

With the Huzzah8266 and EPD Featherwing: calling the two functions one after another but the X position in setcursor is wrong in the first function (upper red text) and correct in the second (lower red text).

void display_dir(String s) { Serial.println(s); epd.setFont(&FreeMonoBold12pt7b); epd.setCursor(10, 0); epd.setTextColor(EPD_RED); epd.print(s);
} void display_swell(String s) { Serial.println(s); epd.setFont(&FreeMonoBold12pt7b); epd.setCursor(10, 90); epd.setTextColor(EPD_RED); epd.print(s); }

Screen Shot 2019-04-12 at 12 Fri 11 28 09 AM
caternuson commented 5 years ago

Cross ref: https://forums.adafruit.com/viewtopic.php?f=57&t=150386

ladyada commented 5 years ago

@tavdog hmm does it work with the built in font? this would be a bug in GFX not eink i think

tavdog commented 5 years ago

I narrowed this down to a leading "\n" in the string. So if there is a new line the string it brings the cursor back to the edge of the screen I guess.