Update comment on sound.cc volume based(speed ->noise) (#26719)

Update sound.cc
pull/26711/head^2
AlexandreSato 3 years ago committed by GitHub
parent cf3ced9d17
commit fa0bf404c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/ui/soundd/sound.cc

@ -46,7 +46,7 @@ void Sound::update() {
return;
}
// scale volume with speed
// 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);
volume = QAudio::convertVolume(volume, QAudio::LogarithmicVolumeScale, QAudio::LinearVolumeScale);

Loading…
Cancel
Save