catch fft division by zero error

This commit is contained in:
dj2ls 2022-12-29 17:49:13 +01:00
parent a3f9dd6f45
commit 5be2a88fd0

View file

@ -974,6 +974,8 @@ class RF:
# try except for avoiding runtime errors by division/0
try:
rms = int(np.sqrt(np.max(d ** 2)))
if rms == 0:
raise ZeroDivisionError
static.AUDIO_DBFS = 20 * np.log10(rms / 32768)
except Exception as e:
self.log.warning(