diff --git a/ui.c b/ui.c index 7912c1f..41b2fea 100644 --- a/ui.c +++ b/ui.c @@ -8449,8 +8449,7 @@ static void sa_save_file(uint8_t format) { char *buf = (char *)spi_buffer; buf += plot_printf(buf, 100, "%U, ", setting.bands[i].start); buf += plot_printf(buf, 100, "%U, ", setting.bands[i].end); - buf += plot_printf(buf, 100, "%f ", setting.bands[i].level); - buf += plot_printf(buf, 100, "\r\n"); + buf += plot_printf(buf, 100, "%f, \"%s\"\r\n", setting.bands[i].level, setting.bands[i].name); // name: older firmware ignores it res = f_write(fs_file, (char *)spi_buffer, buf - (char *)spi_buffer, &size); } } diff --git a/vna_browser.c b/vna_browser.c index 4d40e44..f991d1d 100644 --- a/vna_browser.c +++ b/vna_browser.c @@ -177,11 +177,13 @@ finish2: line[j] = 0; j = 0; char *args[16]; int nargs = parse_line(line, args, 16); // Parse line to 16 args - if (nargs < 2 || args[0][0] == '#' || args[0][0] == '!') continue; // No data or comment or settings + if (nargs < 3 || args[0][0] == '#' || args[0][0] == '!') continue; // No data or comment or settings if (count >= BANDS_MAX) {error = "Format err"; goto finish3;} setting.bands[count].start = my_atoui(args[0]);// Get frequency setting.bands[count].end = my_atoui(args[1]);// Get frequency setting.bands[count].level = my_atof(args[2]); // Get frequency + if (nargs > 3) // Name, files of older firmware have none + plot_printf(setting.bands[count].name, BAND_NAME_SIZE, "%s", args[3]); setting.bands[count].enabled = true; // Get frequency count++; }