From 8fdedea919de505a8adc4a455167414b88a0a441 Mon Sep 17 00:00:00 2001 From: TT Date: Sun, 11 Aug 2019 13:09:21 +0900 Subject: [PATCH] feat: interpolate CAL from current saved file --- main.c | 2 +- plot.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 5aa142e..97ff800 100644 --- a/main.c +++ b/main.c @@ -567,7 +567,7 @@ update_frequencies(void) frequencies[i] = start + span * i / (sweep_points - 1) * 100; if (cal_auto_interpolate) - cal_interpolate(0); + cal_interpolate(lastsaveid); update_marker_index(); diff --git a/plot.c b/plot.c index b6045c5..c5b21f4 100644 --- a/plot.c +++ b/plot.c @@ -1373,12 +1373,11 @@ draw_cal_status(void) ili9341_fill(0, y, 10, 6*YSTEP, 0x0000); if (cal_status & CALSTAT_APPLY) { char c[3] = "C0"; + c[1] += lastsaveid; if (cal_status & CALSTAT_INTERPOLATED) c[0] = 'c'; - if (active_props == ¤t_props) + else if (active_props == ¤t_props) c[1] = '*'; - else - c[1] += lastsaveid; ili9341_drawstring_5x7(c, x, y, 0xffff, 0x0000); y += YSTEP; }