Skip to content

Commit

Permalink
don't use hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Dec 2, 2022
1 parent d087fab commit f1c5d8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/micd.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from cereal import messaging
from common.filter_simple import FirstOrderFilter
from common.realtime import Ratekeeper
from system.hardware import HARDWARE
from system.swaglog import cloudlog

RATE = 10
Expand Down Expand Up @@ -61,8 +60,9 @@ def update(self):
sound_pressure, _ = calculate_spl(self.measurements)
measurements_weighted = apply_a_weighting(self.measurements)
sound_pressure_weighted, sound_pressure_level_weighted = calculate_spl(measurements_weighted)
if not HARDWARE.is_sound_playing():
self.spl_filter_weighted.update(sound_pressure_level_weighted)
# FIXME: HARDWARE.is_sound_playing uses 25%+ CPU onroad
# if not HARDWARE.is_sound_playing():
self.spl_filter_weighted.update(sound_pressure_level_weighted)
else:
sound_pressure = 0
sound_pressure_weighted = 0
Expand Down

0 comments on commit f1c5d8e

Please sign in to comment.