From 755ee83f2651738b1a8834e5df31b3aada62b5e0 Mon Sep 17 00:00:00 2001 From: DiSlord Date: Mon, 6 Jul 2020 21:18:04 +0300 Subject: [PATCH] Define color for grid info Need allow in future user select it by command (add palette) --- nanovna.h | 1 + plot.c | 2 +- ui_sa.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nanovna.h b/nanovna.h index 5568b0a..ba44203 100644 --- a/nanovna.h +++ b/nanovna.h @@ -530,6 +530,7 @@ extern volatile uint8_t redraw_request; #define DARK_GREY RGB565(140,140,140) #define LIGHT_GREY RGB565(220,220,220) #define DEFAULT_GRID_COLOR RGB565(128,128,128) +#define DEFAULT_GRID_VALUE_COLOR RGB565(196,196,196) #define DEFAULT_MENU_COLOR RGB565(255,255,255) #define DEFAULT_MENU_TEXT_COLOR RGB565( 0, 0, 0) #define DEFAULT_MENU_ACTIVE_COLOR RGB565(180,255,180) diff --git a/plot.c b/plot.c index 49de273..72fd4f0 100644 --- a/plot.c +++ b/plot.c @@ -1953,7 +1953,7 @@ static void cell_grid_line_info(int x0, int y0) char buf[32]; int xpos = GRID_X_TEXT - x0; int ypos = 0 - y0 + 2; - ili9341_set_foreground(/* DEFAULT_GRID_COLOR */ DEFAULT_MENU_COLOR ); + ili9341_set_foreground(DEFAULT_GRID_VALUE_COLOR); float ref = get_trace_refpos(TRACE_ACTUAL); float scale = get_trace_scale(TRACE_ACTUAL);; for (int i = 0; i < NGRIDY; i++){ diff --git a/ui_sa.c b/ui_sa.c index adfd902..51f6cd5 100644 --- a/ui_sa.c +++ b/ui_sa.c @@ -1042,7 +1042,7 @@ static void menu_settings2_cb(int item, uint8_t data) toggle_AGC(); break; case 2: - toggle_LNA();; + toggle_LNA(); break; case 3: toggle_tracking();