Change to levelchange and sweeptime cmd added

pull/4/head
erikkaashoek 6 years ago
parent 2c3a268c47
commit 3db1738e0b

@ -156,6 +156,8 @@ static THD_FUNCTION(Thread1, arg)
shell_function(shell_nargs - 1, &shell_args[1]);
shell_function = 0;
osalThreadSleepMilliseconds(10);
if (dirty && MODE_OUTPUT(setting.mode))
draw_menu(); // update screen if in output mode and dirty
continue;
}
// Process UI inputs
@ -2298,8 +2300,9 @@ static const VNAShellCommand commands[] =
{ "if", cmd_if, 0 },
{ "attenuate", cmd_attenuate, 0 },
{ "level", cmd_level, 0 },
{ "sweeptime", cmd_sweeptime, 0 },
{ "leveloffset", cmd_leveloffset, 0 },
{ "levelsweep", cmd_levelsweep, 0 },
{ "levelchange", cmd_levelchange, 0 },
{ "modulation", cmd_modulation, 0 },
{ "rbw", cmd_rbw, 0 },
{ "mode", cmd_mode, 0 },
@ -2428,6 +2431,10 @@ static void VNAShell_executeLine(char *line)
} while (shell_function);
} else {
scp->sc_function(shell_nargs - 1, &shell_args[1]);
if (dirty && MODE_OUTPUT(setting.mode)) {
operation_requested = true; // ensure output is updated
draw_menu();
}
}
return;
}

@ -743,6 +743,7 @@ void ui_mode_menu(void);
void menu_push_lowoutput(void);
void menu_push_highoutput(void);
void menu_move_top(void);
void draw_menu(void);
// Irq operation process set
#define OP_NONE 0x00

@ -1,5 +1,4 @@
/* All rights reserved.
*
/*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
@ -122,7 +121,7 @@ VNA_SHELL_FUNCTION(cmd_load)
VNA_SHELL_FUNCTION(cmd_attenuate)
{
if (argc != 1) {
usage:
// usage:
shell_printf("usage: attenuate 0..31|auto\r\n");
return;
}
@ -146,12 +145,23 @@ VNA_SHELL_FUNCTION(cmd_level)
set_level(f);
}
VNA_SHELL_FUNCTION(cmd_sweeptime)
{
if (argc != 1) {
shell_printf("usage: sweeptime 0.03..600\r\n");
return;
}
float f = my_atof(argv[0]);
set_sweep_time(f*1000.0);
}
VNA_SHELL_FUNCTION(cmd_levelsweep)
VNA_SHELL_FUNCTION(cmd_levelchange)
{
if (argc != 1) {
shell_printf("usage: levelsweep -76..+76\r\n");
shell_printf("usage: levelchange -70..+70\r\n");
return;
}
float f = my_atof(argv[0]);

@ -123,7 +123,7 @@ void ui_mode_normal(void);
//static void ui_mode_menu(void);
static void ui_mode_numeric(int _keypad_mode);
static void ui_mode_keypad(int _keypad_mode);
static void draw_menu(void);
// static void draw_menu(void);
static void leave_ui_mode(void);
static void erase_menu_buttons(void);
static void ui_process_keypad(void);
@ -1721,7 +1721,7 @@ menu_apply_touch(void)
ui_mode_normal();
}
static void
void
draw_menu(void)
{
draw_menu_buttons(menu_stack[menu_current_level]);

Loading…
Cancel
Save

Powered by TurnKey Linux.