diff --git a/main.c b/main.c index cb784dd..11d19f9 100644 --- a/main.c +++ b/main.c @@ -88,7 +88,7 @@ uint16_t redraw_request = 0; // contains REDRAW_XXX flags // Version text, displayed in Config->Version menu, also send by info command const char *info_about[]={ BOARD_NAME, - "2019-2020 Copyright @Erik Kaashoek", + "2019-2022 Copyright @Erik Kaashoek", "2016-2020 Copyright @edy555", "SW licensed under GPL. See: https://github.com/erikkaashoek/tinySA", "Version: " VERSION, diff --git a/nanovna.h b/nanovna.h index 6c1fb4e..f98fa2d 100644 --- a/nanovna.h +++ b/nanovna.h @@ -18,7 +18,8 @@ */ #include "ch.h" -//#ifdef TINYSA_F303 +//#define TINYSA_F303 +#ifdef TINYSA_F303 #ifdef TINYSA_F072 #error "Remove comment for #ifdef TINYSA_F303" #endif diff --git a/sa_cmd.c b/sa_cmd.c index a5454d4..bc33d55 100644 --- a/sa_cmd.c +++ b/sa_cmd.c @@ -22,16 +22,25 @@ static int points = 101; // For 's' and 'm' commands VNA_SHELL_FUNCTION(cmd_mode) { +#ifdef TINYSA3 static const char cmd_low_high[] = "low|high"; +#endif static const char cmd_in_out[] = "input|output"; if (argc != 2) { usage: - usage_printf("mode %s %s\r\n", cmd_low_high,cmd_in_out); +#ifdef TINYSA4 + shell_printf("usage: mode low %s\r\n", cmd_in_out); +#else + shell_printf("usage: mode %s %s\r\n", cmd_low_high,cmd_in_out); return; } +#ifdef TINYSA3 int lh = get_str_index(argv[0], cmd_low_high); +#else + int lh = 0; +#endif int io = get_str_index(argv[1], cmd_in_out); - if (lh<0 || io<0) + if (lh < 0 || io<0) goto usage; menu_move_top(); switch(lh+io*2) @@ -40,18 +49,22 @@ VNA_SHELL_FUNCTION(cmd_mode) set_mode(M_LOW); ui_mode_normal(); break; +#ifdef TINYSA3 case 1: set_mode(M_HIGH); ui_mode_normal(); break; +#endif case 2: set_mode(M_GENLOW); menu_push_lowoutput(); break; +#ifdef TINYSA3 case 3: set_mode(M_GENHIGH); menu_push_highoutput(); break; +#endif } } @@ -358,8 +371,12 @@ VNA_SHELL_FUNCTION(cmd_ext_gain) VNA_SHELL_FUNCTION(cmd_levelchange) { - if (argc != 1 || argv[0][0] == '?') { - usage_printf("levelchange -70..+70\r\n"); + if (argc != 1) { +#ifdef TINYSA4 + shell_printf("usage: levelchange -90..+90\r\n"); +#else + shell_printf("usage: levelchange -70..+70\r\n"); +#endif return; } float f = my_atof(argv[0]); @@ -510,7 +527,7 @@ VNA_SHELL_FUNCTION(cmd_rbw) if (argc != 1 || argv[0][0] == '?') { usage: #ifdef TINYSA4 - usage_printf("rbw 0.3..850|auto\r\n%.1FHz\r\n", actual_rbw_x10*100.0); + usage_printf("rbw 0.2..850|auto\r\n%.1FHz\r\n", actual_rbw_x10*100.0); #else usage_printf("rbw 2..600|auto\r\n%.1FHz\r\n", actual_rbw_x10*100.0); #endif @@ -538,7 +555,11 @@ VNA_SHELL_FUNCTION(cmd_if) { if (argc != 1 || argv[0][0] == '?') { usage: - usage_printf("if {433M..435M}\r\n%QHz\r\n", setting.frequency_IF); +#ifdef TINYSA4 + usage_printf("usage: if {975M..979M}\r\n%QHz\r\n", setting.frequency_IF); +#else + usage_printf("usage: if {433M..435M}\r\n%QHz\r\n", setting.frequency_IF); +#endif return; } freq_t a = (freq_t)my_atoi(argv[0]); @@ -1120,7 +1141,7 @@ VNA_SHELL_FUNCTION(cmd_correction) { (void)argc; #ifdef TINYSA4 - static const char cmd[] = "low|lna|ultra|ultra_lna|direct|direct_lna|out|out_direct|out_adf|out_ultra|high|off|on"; + static const char cmd[] = "low|lna|ultra|ultra_lna|direct|direct_lna|out|out_direct|out_adf|out_ultra|off|on"; static const char range[] = "0-19"; #else static const char cmd[] = "low|high";