mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
techo_ui: some tweaks
This commit is contained in:
parent
e14b022a7c
commit
b332b06304
3 changed files with 10 additions and 5 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue