Merge pull request #629 from fdlamotte/techo_ui_tweaks

techo_ui: some tweaks
Этот коммит содержится в:
ripplebiz
2025-08-17 17:48:47 +10:00
коммит произвёл GitHub
родитель 7613b9455d b332b06304
Коммит ed3f52775a
3 изменённых файлов: 10 добавлений и 5 удалений
+2 -2
Просмотреть файл
@@ -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() {