mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
feat: add bandwidth command
This commit is contained in:
parent
fe7a1ac4de
commit
d7c7d8faeb
18
main.c
18
main.c
|
|
@ -1946,6 +1946,23 @@ VNA_SHELL_FUNCTION(cmd_port)
|
||||||
tlv320aic3204_select(port);
|
tlv320aic3204_select(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VNA_SHELL_FUNCTION(cmd_bandwidth)
|
||||||
|
{
|
||||||
|
if (argc != 1)
|
||||||
|
goto usage;
|
||||||
|
|
||||||
|
static const char bw_choice[] = "1000|300|100|30|10";
|
||||||
|
int i = get_str_index(argv[0], bw_choice);
|
||||||
|
if (i < 0)
|
||||||
|
goto usage;
|
||||||
|
|
||||||
|
bandwidth = i;
|
||||||
|
return;
|
||||||
|
|
||||||
|
usage:
|
||||||
|
shell_printf("usage: bandwidth {%s}\r\n", bw_choice);
|
||||||
|
}
|
||||||
|
|
||||||
VNA_SHELL_FUNCTION(cmd_stat)
|
VNA_SHELL_FUNCTION(cmd_stat)
|
||||||
{
|
{
|
||||||
int16_t *p = &rx_buffer[0];
|
int16_t *p = &rx_buffer[0];
|
||||||
|
|
@ -2134,6 +2151,7 @@ static const VNAShellCommand commands[] =
|
||||||
{"dump" , cmd_dump , 0},
|
{"dump" , cmd_dump , 0},
|
||||||
#endif
|
#endif
|
||||||
{"frequencies" , cmd_frequencies , 0},
|
{"frequencies" , cmd_frequencies , 0},
|
||||||
|
{"bandwidth" , cmd_bandwidth , 0},
|
||||||
{"port" , cmd_port , 0},
|
{"port" , cmd_port , 0},
|
||||||
{"stat" , cmd_stat , 0},
|
{"stat" , cmd_stat , 0},
|
||||||
{"gain" , cmd_gain , 0},
|
{"gain" , cmd_gain , 0},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue