diff --git a/nanovna.h b/nanovna.h index 8fe77d9..c0f63b9 100644 --- a/nanovna.h +++ b/nanovna.h @@ -73,7 +73,11 @@ * main.c */ #ifdef __SA__ +#ifdef TINYSA4 +#define POINTS_COUNT 450 +#else #define POINTS_COUNT 290 +#endif #define MARKER_COUNT 4 #define TRACES_MAX 3 diff --git a/plot.c b/plot.c index 65a3415..e74fbeb 100644 --- a/plot.c +++ b/plot.c @@ -2394,7 +2394,7 @@ redraw_frame(void) static void update_waterfall(void){ int i; - int w_width = area_width < POINTS_COUNT ? area_width : POINTS_COUNT; + int w_width = area_width < WIDTH ? area_width : WIDTH; // Waterfall only in 290 or 145 points // if (!(sweep_points == 290 || sweep_points == 145)) // return; @@ -2447,7 +2447,7 @@ static void update_waterfall(void){ else color = RGB565( 0, 124-((y-160)*4), 252-((y-160)*4)); #endif - while (j * sweep_points < (i+1) * 290) { // Scale waterfall to 290 points + while (j * sweep_points < (i+1) * WIDTH) { // Scale waterfall to WIDTH points spi_buffer[j++] = color; } } diff --git a/ui_sa.c b/ui_sa.c index 7f57d89..536c5c8 100644 --- a/ui_sa.c +++ b/ui_sa.c @@ -758,10 +758,10 @@ static UI_FUNCTION_ADV_CALLBACK(menu_spur_acb) if (b){ if (setting.mode == M_LOW) { b->param_1.text = "SPUR\nREMOVAL"; - b->icon = setting.spur_removal == 0 ? BUTTON_ICON_NOCHECK : BUTTON_ICON_CHECK; + b->icon = AUTO_ICON(setting.spur_removal); } else { b->param_1.text = "MIRROR\nMASKING"; - b->icon = setting.mirror_masking == 0 ? BUTTON_ICON_NOCHECK : BUTTON_ICON_CHECK; + b->icon = AUTO_ICON(setting.mirror_masking); } return; }