fix tinySA3 build (issue #138)

- Modification of the tinySA3 repo source to re-enable a build from
the current repo content even if there are no relevant changes
for the little tinySA3.
- Fix also a warning about strncpy truncation in "ui.c".

Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
pull/139/head
Martin 4 months ago
parent db83a996db
commit 0a76ffd749

@ -158,6 +158,8 @@
*/ */
#ifdef TINYSA4 #ifdef TINYSA4
#define CH_CFG_USE_WAITEXIT TRUE #define CH_CFG_USE_WAITEXIT TRUE
#else
#define CH_CFG_USE_WAITEXIT FALSE
#endif #endif
/** /**

@ -2266,13 +2266,18 @@ VNA_SHELL_FUNCTION(cmd_info)
(void)argc; (void)argc;
(void)argv; (void)argv;
int i = 0; int i = 0;
#ifdef TINYSA3
while (info_about[i]) { while (info_about[i]) {
shell_printf("%s%s\r\n", info_about[i], (i == 0 ? hw_text : "")); shell_printf("%s\r\n", info_about[i]);
i++; i++;
} }
#ifdef TINYSA3
if (has_esd) if (has_esd)
shell_printf("ESD protected\r\n"); shell_printf("ESD protected\r\n");
#else
while (info_about[i]) {
shell_printf("%s%s\r\n", info_about[i], (i == 0 ? hw_text : ""));
i++;
}
#endif #endif
} }
#endif #endif

@ -18,7 +18,7 @@
*/ */
#include "ch.h" #include "ch.h"
//#ifdef 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
@ -26,7 +26,7 @@
#define TINYSA4 #define TINYSA4
#endif #endif
#define TINYSA4_PROTO #define TINYSA4_PROTO
//#endif #endif
#ifdef TINYSA_F072 #ifdef TINYSA_F072
#ifdef TINYSA_F303 #ifdef TINYSA_F303

@ -608,16 +608,18 @@ VNA_SHELL_FUNCTION(cmd_if)
#ifdef TINYSA4 #ifdef TINYSA4
if (hw_if) if (hw_if)
t = "1067M..1073M"; t = "1067M..1073M";
usage_printf("usage: if {%s}\r\n%QHz\r\n", t, setting.frequency_IF);
#else #else
usage_printf("usage: if {433M..435M}\r\n%QHz\r\n", setting.frequency_IF); t = "433M..435M";
#endif #endif
usage_printf("usage: if {%s}\r\n%QHz\r\n", t, setting.frequency_IF);
return; return;
} }
freq_t a = (freq_t)my_atoi(argv[0]); freq_t a = (freq_t)my_atoi(argv[0]);
freq_t f = DEFAULT_IF; freq_t f = DEFAULT_IF;
#ifdef TINYSA4
if (hw_if) if (hw_if)
f = DEFAULT_IF_PLUS; f = DEFAULT_IF_PLUS;
#endif
if (a!= 0 &&( a < (f - (freq_t)5000000) || a>(f + (freq_t)5000000))) if (a!= 0 &&( a < (f - (freq_t)5000000) || a>(f + (freq_t)5000000)))
goto usage; goto usage;
setting.auto_IF = false; setting.auto_IF = false;

@ -6396,7 +6396,7 @@ redraw_cal_status:
// Compact status string // Compact status string
// ili9341_set_background(LCD_FG_COLOR); // ili9341_set_background(LCD_FG_COLOR);
ili9341_set_foreground(LCD_FG_COLOR); ili9341_set_foreground(LCD_FG_COLOR);
strncpy(buf," ",BLEN-1); strncpy(buf," ",BLEN);
if (setting.auto_IF) if (setting.auto_IF)
buf[0] = 'f'; buf[0] = 'f';
else else

Loading…
Cancel
Save

Powered by TurnKey Linux.