mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2026-04-21 06:14:05 +00:00
fix delay on frequency change
This commit is contained in:
parent
c083fb9298
commit
7d7b752569
2 changed files with 8 additions and 6 deletions
12
main.c
12
main.c
|
|
@ -397,12 +397,13 @@ void scan_lcd(void)
|
|||
|
||||
rewind:
|
||||
frequency_updated = FALSE;
|
||||
delay = 4;
|
||||
|
||||
delay = set_frequency(frequencies[0]);
|
||||
delay += 2;
|
||||
for (i = 0; i < sweep_points; i++) {
|
||||
set_frequency(frequencies[i]);
|
||||
tlv320aic3204_select_in3();
|
||||
wait_dsp(delay+2);
|
||||
wait_dsp(delay);
|
||||
|
||||
// blink LED while scanning
|
||||
palClearPad(GPIOC, GPIOC_LED);
|
||||
|
||||
|
|
@ -410,12 +411,11 @@ void scan_lcd(void)
|
|||
calculate_gamma(measured[0][i]);
|
||||
|
||||
tlv320aic3204_select_in1();
|
||||
wait_dsp(2+2);
|
||||
wait_dsp(delay);
|
||||
|
||||
/* calculate transmission coeficient */
|
||||
calculate_gamma(measured[1][i]);
|
||||
|
||||
delay = set_frequency(frequencies[(i+1)%sweep_points]);
|
||||
// blink LED while scanning
|
||||
palSetPad(GPIOC, GPIOC_LED);
|
||||
ui_process();
|
||||
|
|
@ -427,8 +427,10 @@ void scan_lcd(void)
|
|||
if (cal_status & CALSTAT_APPLY)
|
||||
apply_error_term();
|
||||
|
||||
/* calculate trace coordinates */
|
||||
plot_into_index(measured);
|
||||
|
||||
/* plot trace as raster */
|
||||
draw_cell_all();
|
||||
}
|
||||
|
||||
|
|
|
|||
2
si5351.c
2
si5351.c
|
|
@ -304,7 +304,7 @@ int
|
|||
si5351_set_frequency_with_offset(int freq, int offset, uint8_t drive_strength)
|
||||
{
|
||||
int band;
|
||||
int delay = 3;
|
||||
int delay = 5;
|
||||
if (freq <= 100000000) {
|
||||
band = 0;
|
||||
} else if (freq < 150000000) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue