Adjust gain factor

This commit is contained in:
Jan Hamal Dvořák 2024-06-07 21:33:16 +02:00
parent 3cf5214bb8
commit 421d298c86

View file

@ -544,11 +544,11 @@ static void run_command(uint8_t cmd, uint32_t arg)
dma_timer_set_fraction(dma_t_samp, 1, CLK_SYS_HZ / (sample_rate * DECIMATE));
} else if (0x04 == cmd) {
/* Set the tuner gain level */
gain = INIT_GAIN * powf(10.0f, 0.01f * arg);
gain = INIT_GAIN * powf(10.0f, 0.005f * arg);
} else if (0x0d == cmd) {
/* Set tuner gain by the tuner's gain index */
if (arg < NUM_GAINS) {
gain = INIT_GAIN * powf(10.0f, 0.01f * gains[arg]);
gain = INIT_GAIN * powf(10.0f, 0.005f * gains[arg]);
}
}
}