diff --git a/radio/src/gui/colorlcd/libui/numberedit.cpp b/radio/src/gui/colorlcd/libui/numberedit.cpp index 8f79f5b74..da22a9b26 100644 --- a/radio/src/gui/colorlcd/libui/numberedit.cpp +++ b/radio/src/gui/colorlcd/libui/numberedit.cpp @@ -300,3 +300,15 @@ void NumberEdit::setValue(int value) updateDisplay(); if (edit) edit->update(); } + +void NumberEdit::checkEvents() +{ + if (_getValue) { + int newValue = _getValue(); + if (newValue != currentValue) { + currentValue = newValue; + updateDisplay(); + } + } + TextButton::checkEvents(); +} diff --git a/radio/src/gui/colorlcd/libui/numberedit.h b/radio/src/gui/colorlcd/libui/numberedit.h index 14d0312e5..b138b6a1b 100644 --- a/radio/src/gui/colorlcd/libui/numberedit.h +++ b/radio/src/gui/colorlcd/libui/numberedit.h @@ -120,4 +120,6 @@ class NumberEdit : public TextButton void updateDisplay(); void openEdit(); + + void checkEvents() override; }; diff --git a/radio/src/lua/lua_lvgl_widget.cpp b/radio/src/lua/lua_lvgl_widget.cpp index 0d64e5f99..0a731fb68 100644 --- a/radio/src/lua/lua_lvgl_widget.cpp +++ b/radio/src/lua/lua_lvgl_widget.cpp @@ -1337,8 +1337,8 @@ next2: } next: // Second half - dx1 = (int8_t)(x3 - x2); if(dx1<0) { dx1 = -dx1; signx1 = -1; } else signx1 = 1; - dy1 = (int8_t)(y3 - y2); + dx1 = (coord_t)(x3 - x2); if(dx1<0) { dx1 = -dx1; signx1 = -1; } else signx1 = 1; + dy1 = (coord_t)(y3 - y2); t1x = x2; if (dy1 > dx1) { // swap values