Changed to "ultra start/auto"

SI443_RBW_update
erikkaashoek 4 years ago
parent 0c68b74fc8
commit 76ed34ba9c

@ -2040,7 +2040,7 @@ static const VNAShellCommand commands[] =
#endif #endif
#ifdef __ULTRA__ #ifdef __ULTRA__
{ "ultra", cmd_ultra, CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD }, { "ultra", cmd_ultra, CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD },
{ "ultra_start", cmd_ultra_start, CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD }, // { "ultra_start", cmd_ultra_start, CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD },
#endif #endif
{ "load", cmd_load, CMD_RUN_IN_LOAD }, { "load", cmd_load, CMD_RUN_IN_LOAD },
{ "ext_gain", cmd_ext_gain, CMD_RUN_IN_LOAD}, { "ext_gain", cmd_ext_gain, CMD_RUN_IN_LOAD},

@ -153,12 +153,52 @@ VNA_SHELL_FUNCTION(cmd_lna)
#ifdef __ULTRA__ #ifdef __ULTRA__
VNA_SHELL_FUNCTION(cmd_ultra) VNA_SHELL_FUNCTION(cmd_ultra)
{ {
int m = generic_option_cmd("ultra", "off|on", argc, argv[0]); const char *ultra_cmd = "off|on|auto|start";
if (m>=0) { if (argc<1 || argc>2)
goto usage;
if (argv[0][0] == '?')
goto usage;
int m = get_str_index(argv[0], ultra_cmd);
freq_t a = ULTRA_AUTO;
switch(m) {
case 0:
case 1:
config.ultra = m; config.ultra = m;
update_min_max_freq(); update_min_max_freq();
break;
case 2:
goto auto_label;
case 3:
if (argc != 2)
goto usage;
a = my_atoui(argv[1]);
auto_label:
config.ultra_threshold = a;
ultra_threshold = a;
dirty = true;
break;
default:
{
usage:
usage_printf("ultra %s {freq}\r\n", ultra_cmd);
}
} }
} }
/*
VNA_SHELL_FUNCTION(cmd_ultra_start)
{
if (argc != 1 || argv[0][0] == '?') {
usage_printf("ultra_start {0..4290M}\r\n%QHz\r\n", config.ultra_threshold);
return;
} else {
freq_t a = (freq_t)my_atoi(argv[0]);
config.ultra_threshold = a;
ultra_threshold = (config.ultra_threshold == 0 ? DEFAULT_ULTRA_THRESHOLD : config.ultra_threshold);
dirty = true;
config_save();
}
}
*/
#endif #endif
VNA_SHELL_FUNCTION(cmd_output) VNA_SHELL_FUNCTION(cmd_output)
@ -448,22 +488,6 @@ VNA_SHELL_FUNCTION(cmd_zero)
config.ext_zero_level = my_atoi(argv[0]); config.ext_zero_level = my_atoi(argv[0]);
} }
#ifdef __ULTRA__
VNA_SHELL_FUNCTION(cmd_ultra_start)
{
if (argc != 1 || argv[0][0] == '?') {
usage_printf("ultra_start {0..4290M}\r\n%QHz\r\n", config.ultra_threshold);
return;
} else {
freq_t a = (freq_t)my_atoi(argv[0]);
config.ultra_threshold = a;
ultra_threshold = (config.ultra_threshold == 0 ? DEFAULT_ULTRA_THRESHOLD : config.ultra_threshold);
dirty = true;
config_save();
}
}
#endif
#ifdef TINYSA4 #ifdef TINYSA4
VNA_SHELL_FUNCTION(cmd_direct) VNA_SHELL_FUNCTION(cmd_direct)
{ {

@ -4019,10 +4019,10 @@ again: // Spur redu
} }
#endif #endif
#ifdef __SI4463__ #ifdef __SI4463__
if (scandirty)
my_microsecond_delay(10000); // Extra time to avoid gap when filling SI4468
if (/* S_STATE(setting.spur_removal) == 0 && */ SI4432_step_delay == 0 && setting.repeat == 1 && setting.sweep_time_us < 100*ONE_MS_TIME) { if (/* S_STATE(setting.spur_removal) == 0 && */ SI4432_step_delay == 0 && setting.repeat == 1 && setting.sweep_time_us < 100*ONE_MS_TIME) {
// if (scandirty)
// my_microsecond_delay(10000); // Extra time to avoid gap when filling SI4468
SI446x_Fill(MODE_SELECT(setting.mode), 1); // fast mode possible to pre-fill RSSI buffer SI446x_Fill(MODE_SELECT(setting.mode), 1); // fast mode possible to pre-fill RSSI buffer
} }
#endif #endif

Loading…
Cancel
Save

Powered by TurnKey Linux.