fix(bw): pot/slider bars can overlap on main view (#4787)
This commit is contained in:
@@ -114,9 +114,9 @@ void drawPotsBars()
|
|||||||
for (uint8_t i = 0; i < max_pots; i++) {
|
for (uint8_t i = 0; i < max_pots; i++) {
|
||||||
if (IS_POT_SLIDER_AVAILABLE(i)) {
|
if (IS_POT_SLIDER_AVAILABLE(i)) {
|
||||||
coord_t x = xstart + (i % cols) * 5;
|
coord_t x = xstart + (i % cols) * 5;
|
||||||
coord_t y = lines == 1 ? (LCD_H - 8) : i >= cols ? (LCD_H - 8) : (LCD_H - 8 - BAR_HEIGHT / 2);
|
coord_t y = lines == 1 ? (LCD_H - 8) : i >= cols ? (LCD_H - 8) : (LCD_H - 8 - BAR_HEIGHT / 2 - 1);
|
||||||
auto v = calibratedAnalogs[offset + i] + RESX;
|
auto v = calibratedAnalogs[offset + i] + RESX;
|
||||||
uint8_t len = (v * BAR_HEIGHT / (RESX * 2 * lines)) + 1l;
|
uint8_t len = (v * (BAR_HEIGHT - (lines - 1)) / (RESX * 2 * lines)) + 1l;
|
||||||
V_BAR(x, y, len);
|
V_BAR(x, y, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user