Open
Description
esp8266-oled-ssd1306/src/OLEDDisplay.cpp
Line 716 in 057629d
Hello,
in every drawStringInternal
there in an increase in line height so the last check:
(yMove + lineNumber * lineHeight) >= this->height()
will always be true
if the texts fill all the lines of the screen.
In order to solve, you can break the loop just after drawing the string:
drawStringResult = drawStringInternal(xMove, yMove + (lineNumber++) * lineHeight , &text[lastDrawnPos], preferredBreakpoint - lastDrawnPos, widthAtBreakpoint, true);
if (drawStringResult == 0) // we are past the display already?
break;
if (firstLineChars == 0)
firstLineChars = preferredBreakpoint;
and return:
if ((drawStringResult + lastDrawnPos) < length) {
return firstLineChars ;
}
return 0;
Metadata
Metadata
Assignees
Labels
No labels