Merge branch 'multi_trace' into V4.3

pull/34/head
erikkaashoek 3 years ago
commit 032d634702

@ -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 // Version text, displayed in Config->Version menu, also send by info command
const char *info_about[]={ const char *info_about[]={
BOARD_NAME, BOARD_NAME,
"2019-2020 Copyright @Erik Kaashoek", "2019-2022 Copyright @Erik Kaashoek",
"2016-2020 Copyright @edy555", "2016-2020 Copyright @edy555",
"SW licensed under GPL. See: https://github.com/erikkaashoek/tinySA", "SW licensed under GPL. See: https://github.com/erikkaashoek/tinySA",
"Version: " VERSION, "Version: " VERSION,

@ -18,7 +18,8 @@
*/ */
#include "ch.h" #include "ch.h"
//#ifdef TINYSA_F303 //#define TINYSA_F303
#ifdef TINYSA_F303
#ifdef TINYSA_F072 #ifdef TINYSA_F072
#error "Remove comment for #ifdef TINYSA_F303" #error "Remove comment for #ifdef TINYSA_F303"
#endif #endif

@ -22,16 +22,25 @@ static int points = 101; // For 's' and 'm' commands
VNA_SHELL_FUNCTION(cmd_mode) VNA_SHELL_FUNCTION(cmd_mode)
{ {
#ifdef TINYSA3
static const char cmd_low_high[] = "low|high"; static const char cmd_low_high[] = "low|high";
#endif
static const char cmd_in_out[] = "input|output"; static const char cmd_in_out[] = "input|output";
if (argc != 2) { if (argc != 2) {
usage: 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; return;
} }
#ifdef TINYSA3
int lh = get_str_index(argv[0], cmd_low_high); 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); int io = get_str_index(argv[1], cmd_in_out);
if (lh<0 || io<0) if (lh < 0 || io<0)
goto usage; goto usage;
menu_move_top(); menu_move_top();
switch(lh+io*2) switch(lh+io*2)
@ -40,18 +49,22 @@ VNA_SHELL_FUNCTION(cmd_mode)
set_mode(M_LOW); set_mode(M_LOW);
ui_mode_normal(); ui_mode_normal();
break; break;
#ifdef TINYSA3
case 1: case 1:
set_mode(M_HIGH); set_mode(M_HIGH);
ui_mode_normal(); ui_mode_normal();
break; break;
#endif
case 2: case 2:
set_mode(M_GENLOW); set_mode(M_GENLOW);
menu_push_lowoutput(); menu_push_lowoutput();
break; break;
#ifdef TINYSA3
case 3: case 3:
set_mode(M_GENHIGH); set_mode(M_GENHIGH);
menu_push_highoutput(); menu_push_highoutput();
break; break;
#endif
} }
} }
@ -358,8 +371,12 @@ VNA_SHELL_FUNCTION(cmd_ext_gain)
VNA_SHELL_FUNCTION(cmd_levelchange) VNA_SHELL_FUNCTION(cmd_levelchange)
{ {
if (argc != 1 || argv[0][0] == '?') { if (argc != 1) {
usage_printf("levelchange -70..+70\r\n"); #ifdef TINYSA4
shell_printf("usage: levelchange -90..+90\r\n");
#else
shell_printf("usage: levelchange -70..+70\r\n");
#endif
return; return;
} }
float f = my_atof(argv[0]); float f = my_atof(argv[0]);
@ -510,7 +527,7 @@ VNA_SHELL_FUNCTION(cmd_rbw)
if (argc != 1 || argv[0][0] == '?') { if (argc != 1 || argv[0][0] == '?') {
usage: usage:
#ifdef TINYSA4 #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 #else
usage_printf("rbw 2..600|auto\r\n%.1FHz\r\n", actual_rbw_x10*100.0); usage_printf("rbw 2..600|auto\r\n%.1FHz\r\n", actual_rbw_x10*100.0);
#endif #endif
@ -538,7 +555,11 @@ VNA_SHELL_FUNCTION(cmd_if)
{ {
if (argc != 1 || argv[0][0] == '?') { if (argc != 1 || argv[0][0] == '?') {
usage: 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; return;
} }
freq_t a = (freq_t)my_atoi(argv[0]); freq_t a = (freq_t)my_atoi(argv[0]);
@ -1120,7 +1141,7 @@ VNA_SHELL_FUNCTION(cmd_correction)
{ {
(void)argc; (void)argc;
#ifdef TINYSA4 #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"; static const char range[] = "0-19";
#else #else
static const char cmd[] = "low|high"; static const char cmd[] = "low|high";

Loading…
Cancel
Save

Powered by TurnKey Linux.