From 30b091288f7c231f94b1039b7f51fa0c889f1070 Mon Sep 17 00:00:00 2001 From: deanlee Date: Sat, 6 Nov 2021 07:04:15 +0800 Subject: [PATCH] same freq as ui --- selfdrive/ui/soundd.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/ui/soundd.cc b/selfdrive/ui/soundd.cc index f14414366a..c384cc54af 100644 --- a/selfdrive/ui/soundd.cc +++ b/selfdrive/ui/soundd.cc @@ -45,11 +45,11 @@ public: QTimer *timer = new QTimer(this); QObject::connect(timer, &QTimer::timeout, this, &Sound::update); - timer->start(); + timer->start(1000 / UI_FREQ); }; void update() { - sm.update(100); + sm.update(0); if (sm.updated("carState")) { // scale volume with speed float volume = util::map_val(sm["carState"].getCarState().getVEgo(), 0.f, 20.f,