Skip to content

Commit 56ff3b2

Browse files
authored
fix(color): channel bars on outputs list not correct size if extended limits setting changed (#6157)
1 parent 34cfbb6 commit 56ff3b2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

radio/src/gui/colorlcd/controls/channel_bar.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void ChannelBar::checkEvents()
7070

7171
int newValue = getValue();
7272

73-
if (value != newValue) {
73+
if (value != newValue || extendedLimits != g_model.extendedLimits) {
7474
value = newValue;
7575

7676
std::string s;
@@ -81,7 +81,7 @@ void ChannelBar::checkEvents()
8181
else
8282
s = formatNumberAsString(calcRESXto100(value), 0, 0, "", "%");
8383

84-
if (s != valStr) {
84+
if (s != valStr || extendedLimits != g_model.extendedLimits) {
8585
valStr = s;
8686
lv_label_set_text(valText, s.c_str());
8787

@@ -100,6 +100,8 @@ void ChannelBar::checkEvents()
100100
lv_obj_set_pos(bar, x, 0);
101101
lv_obj_set_size(bar, size, height());
102102
}
103+
104+
extendedLimits = g_model.extendedLimits;
103105
}
104106
}
105107

radio/src/gui/colorlcd/controls/channel_bar.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class ChannelBar : public Window
4040
protected:
4141
uint8_t channel = 0;
4242
int16_t value = -10000;
43+
bool extendedLimits = false;
4344
std::string valStr;
4445
std::function<int16_t()> getValue;
4546
lv_obj_t* valText = nullptr;

0 commit comments

Comments
 (0)