From 1ca9fa7fce59a8a01d7b469f0ff375cd1bb408a4 Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Wed, 7 Dec 2022 22:15:58 -0800 Subject: [PATCH] soundd: tune volume to reach max at slightly higher noise level old-commit-hash: d64a5020b20cf32f2a9ce3a3ba2dd8547751ebc5 --- selfdrive/ui/soundd/sound.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/soundd/sound.cc b/selfdrive/ui/soundd/sound.cc index d07b6b6efd..42fc9c4b1a 100644 --- a/selfdrive/ui/soundd/sound.cc +++ b/selfdrive/ui/soundd/sound.cc @@ -48,7 +48,7 @@ void Sound::update() { // scale volume using ambient noise level if (sm.updated("microphone")) { - float volume = util::map_val(sm["microphone"].getMicrophone().getFilteredSoundPressureWeightedDb(), 30.f, 52.f, 0.f, 1.f); + float volume = util::map_val(sm["microphone"].getMicrophone().getFilteredSoundPressureWeightedDb(), 30.f, 54.f, 0.f, 1.f); volume = QAudio::convertVolume(volume, QAudio::LogarithmicVolumeScale, QAudio::LinearVolumeScale); Hardware::set_volume(volume); }