Switches position was not optimal in Main view [Switches]

This commit is contained in:
Bertrand Songis
2019-05-31 21:13:57 +02:00
parent 59e2347a35
commit f6ea6542d7
+10
View File
@@ -492,6 +492,16 @@ void menuMainView(event_t event)
drawSwitch(x[i], y[i], sw, 0);
}
}
#elif defined(PCBXLITES)
static const uint8_t x[NUM_SWITCHES] = {2*FW-2, 16*FW+1, 2*FW-2, 16*FW+1, 2*FW-2, 16*FW+1};
static const uint8_t y[NUM_SWITCHES] = {4*FH+1, 4*FH+1, 6*FH+1, 6*FH+1, 5*FH+1, 5*FH+1};
for (int i=0; i<NUM_SWITCHES; ++i) {
if (SWITCH_EXISTS(i)) {
getvalue_t val = getValue(MIXSRC_FIRST_SWITCH + i);
getvalue_t sw = ((val < 0) ? 3 * i + 1 : ((val == 0) ? 3 * i + 2 : 3 * i + 3));
drawSwitch(x[i], y[i], sw, 0);
}
}
#elif defined(PCBTARANIS)
uint8_t switches = min(NUM_SWITCHES, 6);
for (int i=0; i<switches; ++i) {