Stale marker info at screen capture

main
erikkaashoek 4 weeks ago
parent bc116a4cb0
commit c97938697b

@ -535,7 +535,7 @@ VNA_SHELL_FUNCTION(cmd_deviceid)
} else if (argc == 1) {
if (argv[0][0] == '?')
goto usage;
float v = my_atoui(argv[0]);
uint32_t v = my_atoui(argv[0]);
config.deviceid = v;
} else {
usage:

12
ui.c

@ -8024,9 +8024,17 @@ static void sa_save_file(uint8_t format) {
}
// For screenshot need back to normal mode and redraw screen before capture!!
// Redraw use spi_buffer so need do it before any file ops
if (format == FMT_BMP_FILE && (ui_mode != UI_NORMAL || !(config._mode & _MODE_AUTO_FILENAME))){
// Redraw use spi_buffer so need do it before any file ops.
// Always redraw for BMP (including auto-filename path) to ensure:
// 1. trace_index_y is synced with measured[] so marker triangle position,
// frequency text, and level text are all from the same data epoch.
// 2. If the sweep was aborted mid-way (e.g. interrupted by the screen-capture
// touch), the previously completed sweep's marker indices (which may point
// to a stale no-signal peak by coincidence) are not mixed with partially
// updated measured[] values from the new in-progress sweep.
if (format == FMT_BMP_FILE) {
ui_mode_normal();
plot_into_index(measured);
draw_all(false);
}
// UINT total_size = 0;

Loading…
Cancel
Save

Powered by TurnKey Linux.