line command added

pull/34/head
erikkaashoek 3 years ago
parent 87103accff
commit 9f667bbfcc

@ -2025,6 +2025,9 @@ static const VNAShellCommand commands[] =
{"trace" , cmd_trace , CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD},
{"trigger" , cmd_trigger , CMD_RUN_IN_LOAD},
{"marker" , cmd_marker , CMD_RUN_IN_LOAD},
#ifdef __DRAW_LINE__
{"line" , cmd_line , CMD_RUN_IN_LOAD},
#endif
#ifdef ENABLE_USART_COMMAND
{"usart" , cmd_usart , CMD_WAIT_MUTEX},
{"usart_cfg" , cmd_usart_cfg , CMD_WAIT_MUTEX | CMD_RUN_IN_LOAD},

@ -585,6 +585,31 @@ usage:
usage_printf("direct {%s} {freq(Hz)}\r\n", direct_cmd);
}
#ifdef __DRAW_LINE__
VNA_SHELL_FUNCTION(cmd_line)
{
if (argc != 1 || argv[0][0] == '?')
goto usage;
int type = get_str_index(argv[0], "off");
switch(type) {
case -1: {
float l = my_atof(argv[0]);
setting.draw_line = true;
set_trigger_level(to_dBm(l));
set_trigger(T_AUTO);
redraw_request |= REDRAW_AREA;
}
return;
case 0:
setting.draw_line = false;
redraw_request |= REDRAW_AREA;
return;
}
usage:
usage_printf("line off|{level}\r\n");
}
#endif
VNA_SHELL_FUNCTION(cmd_if1)
{
if (argc != 1 || argv[0][0] == '?') {

@ -397,7 +397,10 @@ void set_input_path(freq_t f)
enable_ultra(true);
enable_direct(true);
enable_high(true);
enable_ADF_output(false, false);
if (setting.tracking_output)
enable_ADF_output(true, true);
else
enable_ADF_output(false, false);
goto common2;
case PATH_ULTRA:
enable_ultra(true);
@ -4151,16 +4154,6 @@ again: // Spur redu
}
}
#endif // __ADF4351__
#if 0
freq_t target_f;
if (!setting.tracking && S_STATE(setting.below_IF)) { // if in low input mode and below IF
if (lf > local_IF + 138000000)
target_f = lf - local_IF; // set LO SI4432 to below IF frequency
else
target_f = local_IF-lf; // set LO SI4432 to below IF frequency
} else
target_f = local_IF+lf; // otherwise to above IF
#endif
if (setting.harmonic && lf > ( setting.mode == M_GENLOW ? ULTRA_MAX_FREQ + 60000000:ULTRA_MAX_FREQ) ) {
target_f /= setting.harmonic;
LO_harmonic = true;
@ -4228,9 +4221,11 @@ again: // Spur redu
}
#endif
} else if (setting.mode == M_HIGH || direct) {
if (signal_path == PATH_DIRECT)
if (signal_path == PATH_DIRECT) {
set_freq (SI4463_RX, lf); // sweep RX, local_IF = 0 in high mode
else
if (setting.tracking_output)
set_freq (ADF4351_LO, lf);
} else
set_freq (ADF4351_LO, lf); // sweep LO, local_IF = 0 in high mode
local_IF = 0;
} else if (setting.mode == M_GENHIGH) {

Loading…
Cancel
Save

Powered by TurnKey Linux.