Merge pull request #629 from fdlamotte/techo_ui_tweaks

techo_ui: some tweaks
This commit is contained in:
ripplebiz 2025-08-17 17:48:47 +10:00 committed by GitHub
commit ed3f52775a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 5 deletions

View file

@ -29,8 +29,8 @@ void GxEPDDisplay::turnOn() {
if (!_init) begin();
#if DISP_BACKLIGHT
digitalWrite(DISP_BACKLIGHT, HIGH);
_isOn = true;
#endif
_isOn = true;
}
void GxEPDDisplay::turnOff() {
@ -132,7 +132,7 @@ uint16_t GxEPDDisplay::getTextWidth(const char* str) {
int16_t x1, y1;
uint16_t w, h;
display.getTextBounds(str, 0, 0, &x1, &y1, &w, &h);
return w / SCALE_X;
return ceil((w + 1) / SCALE_X);
}
void GxEPDDisplay::endFrame() {