From 900c908db80ea0c5280e604b2aee20c09418e99b Mon Sep 17 00:00:00 2001 From: Timofey Titovets Date: Sun, 16 Nov 2025 05:16:58 +0100 Subject: [PATCH] sosfilter: fix case if no notch is defined Signed-off-by: Timofey Titovets --- klippy/extras/sos_filter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/klippy/extras/sos_filter.py b/klippy/extras/sos_filter.py index 293b2258a..76dd4bc26 100644 --- a/klippy/extras/sos_filter.py +++ b/klippy/extras/sos_filter.py @@ -40,6 +40,8 @@ class DigitalFilter: if lowpass: self.filter_sections.append( self._butter(lowpass, "lowpass", lowpass_order)) + if notches is None: + notches = [] for notch_freq in notches: self.filter_sections.append(self._notch(notch_freq, notch_quality)) if len(self.filter_sections) > 0: