From 3f2b850383c8ca827233e52839d6cf9f51797870 Mon Sep 17 00:00:00 2001 From: RussellAult Date: Sat, 22 Jun 2024 16:03:08 -0600 Subject: [PATCH] reduced maximum waterfall_palette y value by 1 - otherwise maximum value of y will trigger the subsequent break - fixes erikkaashoek/tinySA#102 --- plot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plot.c b/plot.c index 20be44f..76ce72f 100644 --- a/plot.c +++ b/plot.c @@ -2152,7 +2152,7 @@ static void update_waterfall(void){ for (i=0; i< sweep_points; i++) { // Add new topline uint16_t color; #ifdef _USE_WATERFALL_PALETTE - uint16_t y = _PALETTE_ALIGN(256 - graph_bottom + index[i]); // should be always in range 0 - graph_bottom + uint16_t y = _PALETTE_ALIGN(255 - graph_bottom + index[i]); // should be always in range 0 - graph_bottom // y = (uint8_t)i; // for test if (y > 255) // at start the index_y_t table could be empty leading to negative y break;