From ba6881eb0f4d54a74dde2a0024815070e48b3a1c Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Sun, 31 Oct 2021 09:30:21 +0100 Subject: [PATCH] Remove compiler warning about `potsPos[idx]` --- radio/src/gui/colorlcd/layouts/sliders.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/radio/src/gui/colorlcd/layouts/sliders.cpp b/radio/src/gui/colorlcd/layouts/sliders.cpp index 650e31331..96dee009f 100644 --- a/radio/src/gui/colorlcd/layouts/sliders.cpp +++ b/radio/src/gui/colorlcd/layouts/sliders.cpp @@ -42,6 +42,7 @@ void MainViewHorizontalSlider::paint(BitmapBuffer * dc) void MainView6POS::paint(BitmapBuffer * dc) { +#if NUM_XPOTS > 0 // prevent compiler warning // The ticks int delta = (width() - TRIM_SQUARE_SIZE) / (XPOTS_MULTIPOS_COUNT - 1); coord_t x = TRIM_SQUARE_SIZE / 2; @@ -55,6 +56,7 @@ void MainView6POS::paint(BitmapBuffer * dc) x = TRIM_SQUARE_SIZE / 2 + divRoundClosest((width() - TRIM_SQUARE_SIZE) * (value -1) , 6); drawTrimSquare(dc, x, 0, COLOR_THEME_FOCUS); dc->drawNumber(x + 1, 0, value, COLOR_THEME_PRIMARY2); +#endif } void MainViewVerticalSlider::paint(BitmapBuffer * dc)