mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
fixed: #70 first measurement point sometimes has wrong value
This commit is contained in:
parent
5651d1e447
commit
e3a10a7868
7
main.c
7
main.c
|
|
@ -286,12 +286,7 @@ adjust_gain(int newfreq)
|
||||||
|
|
||||||
int set_frequency(uint32_t freq)
|
int set_frequency(uint32_t freq)
|
||||||
{
|
{
|
||||||
int delay = 0;
|
int delay = adjust_gain(freq);
|
||||||
if (frequency == freq)
|
|
||||||
return delay;
|
|
||||||
|
|
||||||
delay += adjust_gain(freq);
|
|
||||||
|
|
||||||
int8_t ds = drive_strength;
|
int8_t ds = drive_strength;
|
||||||
if (ds == DRIVE_STRENGTH_AUTO) {
|
if (ds == DRIVE_STRENGTH_AUTO) {
|
||||||
ds = freq > FREQ_HARMONICS ? SI5351_CLK_DRIVE_STRENGTH_8MA : SI5351_CLK_DRIVE_STRENGTH_2MA;
|
ds = freq > FREQ_HARMONICS ? SI5351_CLK_DRIVE_STRENGTH_8MA : SI5351_CLK_DRIVE_STRENGTH_2MA;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue