From bed63ca84bd1a4ac1ecae94e123cc1f80e0148bc Mon Sep 17 00:00:00 2001 From: DiSlord Date: Fri, 17 Jul 2020 17:36:14 +0300 Subject: [PATCH] Add LCD command for debug (disabled as default) Add defines for more easy change to 48kHz ADC Add commented touch calibration settings for 4`LCD --- main.c | 23 ++++++++++++++++++++++- nanovna.h | 10 ++++++++++ ui.c | 6 ++++-- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index cf8bd6a..bbcd30a 100644 --- a/main.c +++ b/main.c @@ -69,6 +69,7 @@ static volatile vna_shellcmd_t shell_function = 0; #define ENABLE_COLOR_COMMAND // Enable I2C command for send data to AIC3204, used for debug //#define ENABLE_I2C_COMMAND +//#define ENABLE_LCD_COMMAND static void apply_CH0_error_term_at(int i); static void apply_CH1_error_term_at(int i); @@ -716,7 +717,7 @@ config_t config = { .trace_color = { DEFAULT_TRACE_1_COLOR, DEFAULT_TRACE_2_COLOR, DEFAULT_TRACE_3_COLOR, DEFAULT_TRACE_4_COLOR }, // .touch_cal = { 693, 605, 124, 171 }, // 2.4 inch LCD panel .touch_cal = { 338, 522, 153, 192 }, // 2.8 inch LCD panel -// .touch_cal = { 252, 450, 111, 150 }, //4.0" LCD +// .touch_cal = { 272, 521, 114, 153 }, //4.0" LCD .harmonic_freq_threshold = FREQUENCY_THRESHOLD, .vbat_offset = 500, .bandwidth = BANDWIDTH_1000 @@ -2233,6 +2234,18 @@ VNA_SHELL_FUNCTION(cmd_i2c){ } #endif +#ifdef ENABLE_LCD_COMMAND +VNA_SHELL_FUNCTION(cmd_lcd){ + uint8_t d[VNA_SHELL_MAX_ARGUMENTS]; + if (argc == 0) return; + for (int i=0;i