Skip to content

Commit

Permalink
fix(color): Update of Edge LS v1-part2 when v1-part1 when editing (#3049
Browse files Browse the repository at this point in the history
)
  • Loading branch information
philmoz authored and pfeerick committed Jan 25, 2023
1 parent 7daf88b commit da66e6c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions radio/src/gui/colorlcd/model_logical_switches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,9 @@ class LogicalSwitchEditPage: public Page
auto edit2 = new NumberEdit(logicalSwitchOneWindow, grid.getFieldSlot(2, 1), -1, 222 - cs->v2, GET_SET_DEFAULT(cs->v3));
edit1->setSetValueHandler([=](int32_t newValue) {
cs->v2 = newValue;
cs->v3 = min<uint8_t>(cs->v3, 222 - cs->v2);
SET_DIRTY();
edit2->setMax(222 - cs->v2);
edit2->invalidate();
edit2->setValue(cs->v3);
});
edit1->setDisplayHandler([](int32_t value) {
return formatNumberAsString(lswTimerValue(value), PREC1);
Expand Down

0 comments on commit da66e6c

Please sign in to comment.