ThingPulse / esp8266-oled-ssd1306

Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
https://thingpulse.com
Other
1.98k stars 638 forks source link

Fix drawLogBuffer for scrolling #394

Closed ropg closed 4 months ago

ropg commented 4 months ago

When logBuffer has logBufferMaxLines, the drawing needs to start shifted up by displayHeight % lineHeight so that the first line drops off a bit, and not the last. Now printing to display really just works.

(I moved the length++ and removed the else because both sides of the condition started with it.)

ropg commented 4 months ago

Tnx! There's actually a bit more work to be done: printing too-long strings shouldn't matter (except for size of logBuffer, working on that too) but it confuses the scroll somehow. Am on it.

marcelstoer commented 4 months ago

Thanks for all your contributions, much appreciated!