mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
add single trace command, fix failure on changing polar to rect
This commit is contained in:
parent
74cfdb93a3
commit
ef63476219
4
main.c
4
main.c
|
|
@ -935,10 +935,12 @@ void set_trace_type(int t, int type)
|
|||
if (polar)
|
||||
force = TRUE;
|
||||
}
|
||||
if (force)
|
||||
if (force) {
|
||||
plot_into_index(measured);
|
||||
//force_draw_cells();
|
||||
force_set_markmap();
|
||||
}
|
||||
}
|
||||
|
||||
void set_trace_channel(int t, int channel)
|
||||
{
|
||||
|
|
|
|||
18
ui.c
18
ui.c
|
|
@ -444,6 +444,21 @@ choose_active_marker(void)
|
|||
active_marker = -1;
|
||||
}
|
||||
|
||||
static void
|
||||
menu_single_trace_cb(int item)
|
||||
{
|
||||
(void)item;
|
||||
int t;
|
||||
for (t = 0; t < 4; t++)
|
||||
if (uistat.current_trace != t) {
|
||||
trace[t].enabled = FALSE;
|
||||
}
|
||||
ui_mode_normal();
|
||||
redraw();
|
||||
force_set_markmap();
|
||||
draw_cell_all();
|
||||
}
|
||||
|
||||
static void
|
||||
menu_scale_cb(int item)
|
||||
{
|
||||
|
|
@ -538,7 +553,7 @@ const menuitem_t menu_format[] = {
|
|||
{ MT_CALLBACK, "SMITH", menu_format_cb },
|
||||
{ MT_CALLBACK, "ADMIT", menu_format_cb },
|
||||
{ MT_CALLBACK, "POLAR", menu_format_cb },
|
||||
{ MT_SUBMENU, "NEXT", menu_format2 },
|
||||
{ MT_SUBMENU, "MORE", menu_format2 },
|
||||
//{ MT_CALLBACK, "LINEAR", menu_format_cb },
|
||||
//{ MT_CALLBACK, "SWR", menu_format_cb },
|
||||
{ MT_CANCEL, "BACK", NULL },
|
||||
|
|
@ -553,6 +568,7 @@ const menuitem_t menu_channel[] = {
|
|||
};
|
||||
|
||||
const menuitem_t menu_display[] = {
|
||||
{ MT_CALLBACK, "SGL TRC", menu_single_trace_cb },
|
||||
{ MT_SUBMENU, "TRACE", menu_trace },
|
||||
{ MT_SUBMENU, "FORMAT", menu_format },
|
||||
{ MT_CALLBACK, "SCALE", menu_scale_cb },
|
||||
|
|
|
|||
Loading…
Reference in a new issue