Skip to content

Commit

Permalink
fix(color): Toggle switch not valid for pre-start checks (#4293)
Browse files Browse the repository at this point in the history
pfeerick committed Nov 8, 2023
1 parent e7cd978 commit 95568fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions radio/src/gui/colorlcd/preflight_checks.cpp
Original file line number Diff line number Diff line change
@@ -183,23 +183,23 @@ static std::string switchWarninglabel(swsrc_t index)
#define SW_BTN_W ((LCD_W-24)/SW_BTNS)

SwitchWarnMatrix::SwitchWarnMatrix(Window* parent, const rect_t& r) :
ButtonMatrix(parent, r)
ButtonMatrix(parent, r)
{
// Setup button layout & texts
uint8_t btn_cnt = 0;
for (uint8_t i = 0; i < NUM_SWITCHES; i++) {
if (SWITCH_EXISTS(i)) {
if (SWITCH_WARNING_ALLOWED(i)) {
sw_idx[btn_cnt] = i;
btn_cnt++;
}
}
}

initBtnMap(SW_BTNS, btn_cnt);
update();

uint8_t btn_id = 0;
for (uint8_t i = 0; i < NUM_SWITCHES; i++) {
if (SWITCH_EXISTS(i)) {
if (SWITCH_WARNING_ALLOWED(i)) {
lv_btnmatrix_set_btn_ctrl(lvobj, btn_id, LV_BTNMATRIX_CTRL_RECOLOR);
setTextWithColor(i);
btn_id++;

0 comments on commit 95568fd

Please sign in to comment.