Fix startup ADC clkdiv

This commit is contained in:
Jan Hamal Dvořák 2024-08-10 12:30:05 +02:00
parent 758488c054
commit e02806f3cc

View file

@ -480,7 +480,7 @@ int main()
adc_gpio_init(RX_PIN);
adc_select_input(RX_PIN - 26);
adc_fifo_setup(true, true, 1, false, false);
adc_set_clkdiv(96.0f * ((ADC_RATE / ((float)sample_rate / DECIMATE)) - 1.0f) - 1.0f);
adc_set_clkdiv(96.0f * ((float)ADC_RATE / (sample_rate * DECIMATE)) - 1.0f);
adc_run(true);
rx_lo_init(frequency + sample_rate);