diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index 240010c..46a401c 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -17,7 +17,7 @@
-
+
diff --git a/main.c b/main.c
index a6fec2b..f3a3674 100644
--- a/main.c
+++ b/main.c
@@ -86,7 +86,7 @@ uint8_t auto_capture = false;
// 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 0f57fc4..6b447e4 100644
--- a/nanovna.h
+++ b/nanovna.h
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
#include "ch.h"
-
+//#define TINYSA_F303
#ifdef TINYSA_F303
#ifdef TINYSA_F072
#error "Remove comment for #ifdef TINYSA_F303"
diff --git a/sa_cmd.c b/sa_cmd.c
index ceb3575..9114eb9 100644
--- a/sa_cmd.c
+++ b/sa_cmd.c
@@ -22,16 +22,26 @@ 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:
+#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);
+#endif
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 +50,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
}
}
@@ -295,7 +309,11 @@ VNA_SHELL_FUNCTION(cmd_ext_gain)
VNA_SHELL_FUNCTION(cmd_levelchange)
{
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]);
@@ -400,7 +418,7 @@ VNA_SHELL_FUNCTION(cmd_rbw)
if (argc != 1) {
usage:
#ifdef TINYSA4
- shell_printf("usage: rbw 0.3..850|auto\r\n");
+ shell_printf("usage: rbw 0.2..850|auto\r\n");
#else
shell_printf("usage: rbw 2..600|auto\r\n");
#endif
@@ -428,7 +446,11 @@ VNA_SHELL_FUNCTION(cmd_if)
{
if (argc != 1) {
usage:
+#ifdef TINYSA4
+ shell_printf("usage: if {975M..979M}\r\n%QHz\r\n", setting.frequency_IF);
+#else
shell_printf("usage: if {433M..435M}\r\n%QHz\r\n", setting.frequency_IF);
+#endif
return;
} else {
freq_t a = (freq_t)my_atoi(argv[0]);
@@ -934,7 +956,7 @@ VNA_SHELL_FUNCTION(cmd_correction)
{
(void)argc;
#ifdef TINYSA4
- static const char cmd[] = "low|lna|out|high";
+ static const char cmd[] = "low|lna|out";
static const char range[] = "0-19";
#else
static const char cmd[] = "low|high";
diff --git a/ui_sa.c b/ui_sa.c
index 1d549cb..c80830b 100644
--- a/ui_sa.c
+++ b/ui_sa.c
@@ -1600,7 +1600,7 @@ static UI_FUNCTION_ADV_CALLBACK(menu_traces_acb)
break;
#ifdef TINYSA4
case 6:
- save_to_sd(1+2<