mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Do not display blank space when switch is not available (#5183)
This commit is contained in:
parent
7cd7869d6a
commit
b33a88a69f
1 changed files with 2 additions and 1 deletions
|
@ -554,9 +554,10 @@ void menuModelSetup(event_t event)
|
||||||
int current = 0;
|
int current = 0;
|
||||||
for (int i=0; i<NUM_SWITCHES-1; i++) {
|
for (int i=0; i<NUM_SWITCHES-1; i++) {
|
||||||
if (SWITCH_WARNING_ALLOWED(i)) {
|
if (SWITCH_WARNING_ALLOWED(i)) {
|
||||||
|
div_t qr = div(current, 8);
|
||||||
uint8_t swactive = !(g_model.switchWarningEnable & (1<<i));
|
uint8_t swactive = !(g_model.switchWarningEnable & (1<<i));
|
||||||
c = "\300-\301"[states & 0x03];
|
c = "\300-\301"[states & 0x03];
|
||||||
lcdDrawChar(MODEL_SETUP_2ND_COLUMN+(2*FW*i), y, (i < 4 ? 'A'+i : 'B'+i), line && (menuHorizontalPosition-1==current) ? INVERS : 0);
|
lcdDrawChar(MODEL_SETUP_2ND_COLUMN+qr.rem*(2*FW), y, (i < 4 ? 'A'+i : 'B'+i), line && (menuHorizontalPosition-1==current) ? INVERS : 0);
|
||||||
if (swactive) lcdDrawChar(lcdNextPos, y, c);
|
if (swactive) lcdDrawChar(lcdNextPos, y, c);
|
||||||
++current;
|
++current;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue