mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
feat: interpolate from current cal file and only if cal applied
This commit is contained in:
parent
3b953f061b
commit
0a8bfbff33
7
main.c
7
main.c
|
|
@ -603,9 +603,6 @@ update_frequencies(void)
|
||||||
for (i = 0; i < sweep_points; i++)
|
for (i = 0; i < sweep_points; i++)
|
||||||
frequencies[i] = start + span * i / (sweep_points - 1) * 100;
|
frequencies[i] = start + span * i / (sweep_points - 1) * 100;
|
||||||
|
|
||||||
if (cal_auto_interpolate)
|
|
||||||
cal_interpolate(lastsaveid);
|
|
||||||
|
|
||||||
update_marker_index();
|
update_marker_index();
|
||||||
|
|
||||||
frequency_updated = TRUE;
|
frequency_updated = TRUE;
|
||||||
|
|
@ -647,6 +644,7 @@ void
|
||||||
set_sweep_frequency(int type, float frequency)
|
set_sweep_frequency(int type, float frequency)
|
||||||
{
|
{
|
||||||
int32_t freq = frequency;
|
int32_t freq = frequency;
|
||||||
|
bool cal_applied = cal_status & CALSTAT_APPLY;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ST_START:
|
case ST_START:
|
||||||
freq_mode_startstop();
|
freq_mode_startstop();
|
||||||
|
|
@ -725,6 +723,9 @@ set_sweep_frequency(int type, float frequency)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cal_auto_interpolate && cal_applied)
|
||||||
|
cal_interpolate(lastsaveid);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue