Fix showing of non-existent pots in warnings group (#1129)

* pots warning enabled fix

* yaml_generator whitespace

* Fix UART_MODE_DEBUG

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
eshifri
2021-12-07 20:03:28 +11:00
committed by GitHub
co-authored by Peter Feerick
parent 15a6b6f1d4
commit 16fc05ad8e
18 changed files with 26 additions and 26 deletions
+3 -3
View File
@@ -1514,7 +1514,7 @@ void ModelSetupPage::build(FormWindow * window)
GridLayout centerGrid(group);
for (int i = POT_FIRST, j = 0; i <= POT_LAST; i++) {
char s[8];
if ((IS_POT(i) || IS_POT_MULTIPOS(i))) {
if ((IS_POT(i) || IS_POT_MULTIPOS(i)) && IS_POT_AVAILABLE(i)) {
if (j > 0 && ((j % 4) == 0)) centerGrid.nextLine();
auto button = new TextButton(
@@ -1563,9 +1563,9 @@ void ModelSetupPage::build(FormWindow * window)
(g_model.potsWarnEnabled & (1 << (j + NUM_POTS)))) {
SAVE_POT_POSITION(j + NUM_POTS);
}
button->check(g_model.potsWarnEnabled & (1 << (j + NUM_POTS)));
button->check(g_model.potsWarnEnabled & (1 << (j + NUM_POTS)) ? true : false);
SET_DIRTY();
return (g_model.potsWarnEnabled & (1 << (j + NUM_POTS)));
return (g_model.potsWarnEnabled & (1 << (j + NUM_POTS)) ? 1 : 0);
});
j++;
}