mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
menu: add feedback at correction/pause menu item
This commit is contained in:
parent
dd724da327
commit
b815a5b2fe
|
|
@ -63,6 +63,8 @@ float my_atof(const char *p);
|
|||
|
||||
void toggle_sweep(void);
|
||||
|
||||
extern int8_t sweep_enabled;
|
||||
|
||||
/*
|
||||
* ui.c
|
||||
*/
|
||||
|
|
|
|||
16
ui.c
16
ui.c
|
|
@ -444,6 +444,7 @@ menu_cal2_cb(int item)
|
|||
// toggle applying correction
|
||||
if (cal_status)
|
||||
cal_status ^= CALSTAT_APPLY;
|
||||
draw_menu();
|
||||
break;
|
||||
}
|
||||
draw_cal_status();
|
||||
|
|
@ -631,8 +632,9 @@ menu_stimulus_cb(int item)
|
|||
break;
|
||||
case 5: /* PAUSE */
|
||||
toggle_sweep();
|
||||
menu_move_back();
|
||||
ui_mode_normal();
|
||||
//menu_move_back();
|
||||
//ui_mode_normal();
|
||||
draw_menu();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1133,6 +1135,16 @@ menu_item_modify_attribute(const menuitem_t *menu, int item,
|
|||
*bg = 0x0000;
|
||||
*fg = 0xffff;
|
||||
}
|
||||
} else if (menu == menu_stimulus) {
|
||||
if (item == 5 /* PAUSE */ && !sweep_enabled) {
|
||||
*bg = 0x0000;
|
||||
*fg = 0xffff;
|
||||
}
|
||||
} else if (menu == menu_cal) {
|
||||
if (item == 2 /* CORRECTION */ && (cal_status & CALSTAT_APPLY)) {
|
||||
*bg = 0x0000;
|
||||
*fg = 0xffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue