Allow more time for DC offset to settle.

master
Rob Riggs 2022-01-23 12:23:31 -06:00
rodzic 17a0e74d46
commit 55d94ef38d
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -94,7 +94,7 @@ int adjust_input_gain() {
uint16_t vpp, vavg, vmin, vmax;
set_input_gain(gain);
osDelay(100); // Need time for DC offset to settle.
osDelay(1000); // Need time for DC offset to settle.
std::tie(vpp, vavg, vmin, vmax) = readLevels(AUDIO_IN);
INFO("\nVpp = %" PRIu16 ", Vavg = %" PRIu16 "\n", vpp, vavg);
@ -117,7 +117,7 @@ int adjust_input_gain() {
else gain = 0;
set_input_gain(gain);
osDelay(100); // Need time for DC offset to settle.
osDelay(1000); // Need time for DC offset to settle.
std::tie(vpp, vavg, vmin, vmax) = readLevels(AUDIO_IN);
INFO("\nVpp = %" PRIu16 ", Vavg = %" PRIu16 "\n", vpp, vavg);
@ -156,6 +156,8 @@ void setAudioInputLevels()
INFO("Setting input gain: %d", kiss::settings().input_gain);
set_input_gain(kiss::settings().input_gain);
osDelay(1000); // Need time for DC offset to settle.
uint16_t vpp, vavg, vmin, vmax;
std::tie(vpp, vavg, vmin, vmax) = readLevels(AUDIO_IN);