reduced maximum waterfall_palette y value by 1

- otherwise maximum value of y will trigger the subsequent break
- fixes erikkaashoek/tinySA#102
pull/96/head
RussellAult 2 years ago committed by Bohdan Kmit
parent abb2fce84c
commit 3f2b850383

@ -2152,7 +2152,7 @@ static void update_waterfall(void){
for (i=0; i< sweep_points; i++) { // Add new topline for (i=0; i< sweep_points; i++) { // Add new topline
uint16_t color; uint16_t color;
#ifdef _USE_WATERFALL_PALETTE #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 // y = (uint8_t)i; // for test
if (y > 255) // at start the index_y_t table could be empty leading to negative y if (y > 255) // at start the index_y_t table could be empty leading to negative y
break; break;

Loading…
Cancel
Save

Powered by TurnKey Linux.