gain adjust for frequency

scan_delay_optimize
TT 6 years ago
parent a4ef290126
commit bcb0644070

@ -84,6 +84,7 @@ dsp_process(int16_t *capture, size_t length)
void
calculate_gamma(float gamma[2])
{
#if 1
// calculate reflection coeff. by samp divide by ref
float rs = acc_ref_s;
float rc = acc_ref_c;
@ -93,6 +94,13 @@ calculate_gamma(float gamma[2])
float sc = acc_samp_c;
gamma[0] = (sc * rc + ss * rs) / rr;
gamma[1] = (ss * rc - sc * rs) / rr;
#elif 0
gamma[0] = acc_samp_s;
gamma[1] = acc_samp_c;
#else
gamma[0] = acc_ref_s;
gamma[1] = acc_ref_c;
#endif
}
void

@ -136,8 +136,12 @@ int set_frequency(int freq)
tlv320aic3204_set_gain(95, 95);
delay += 10;
} else
if (freq > 600000000 && frequency <= 600000000) {
tlv320aic3204_set_gain(60, 60);
delay += 10;
} else
if (freq > FREQ_HARMONICS && frequency <= FREQ_HARMONICS) {
tlv320aic3204_set_gain(30, 30);
tlv320aic3204_set_gain(40, 40);
delay += 10;
} else
if (freq <= FREQ_HARMONICS && frequency > FREQ_HARMONICS) {

Loading…
Cancel
Save

Powered by TurnKey Linux.