Re order pots on 2 lines dispay

This commit is contained in:
3djc
2023-06-25 14:32:39 +02:00
committed by Malte Langermann
parent 3eb0122196
commit c8ac653b4f
+1 -1
View File
@@ -98,7 +98,7 @@ void drawPotsBars()
for (uint8_t i = 0; i < max_pots; i++) {
if (IS_POT_SLIDER_AVAILABLE(i)) {
coord_t x = xstart + (i % cols) * 5;
coord_t y = i >= cols ? (LCD_H - 8 - BAR_HEIGHT / 2) : (LCD_H - 8);
coord_t y = lines == 1 ? (LCD_H - 8) : i >= cols ? (LCD_H - 8) : (LCD_H - 8 - BAR_HEIGHT / 2);
auto v = calibratedAnalogs[offset + i] + RESX;
uint8_t len = (v * BAR_HEIGHT / (RESX * 2 * lines)) + 1l;
V_BAR(x, y, len);