bump retry count for `micd` and `soundd` (#36415)

retry
dcam-box
Maxime Desroches 6 days ago committed by GitHub
parent cc8f6eadfe
commit 5289b08bcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      selfdrive/ui/soundd.py
  2. 2
      system/micd.py

@ -124,7 +124,7 @@ class Soundd:
volume = ((weighted_db - AMBIENT_DB) / DB_SCALE) * (MAX_VOLUME - MIN_VOLUME) + MIN_VOLUME
return math.pow(10, (np.clip(volume, MIN_VOLUME, MAX_VOLUME) - 1))
@retry(attempts=7, delay=3)
@retry(attempts=10, delay=3)
def get_stream(self, sd):
# reload sounddevice to reinitialize portaudio
sd._terminate()

@ -94,7 +94,7 @@ class Mic:
self.measurements = self.measurements[FFT_SAMPLES:]
@retry(attempts=7, delay=3)
@retry(attempts=10, delay=3)
def get_stream(self, sd):
# reload sounddevice to reinitialize portaudio
sd._terminate()

Loading…
Cancel
Save