klipper/klippy/extras
Gareth Farrington cb0c38f7d8 sos_filter: Second Order Sections MCU Filter
This is an implementation of the SOS fliltering algorithm that runs on the MCU.

The filter opperates on data in fixed point format to avoid use of the FPU as klipper does not support FPU usage.

This host object handles duties of initalizing and resetting the filter so client dont have to declare their own commands for these opperations. Clients can select how many integer bits they want to use for both the filter coefficients and the filters output value. An arbitrary number of filter sections can be configured. Filters can be designed on the fly with the SciPy library or loaded from another source.

Signed-off-by: Gareth Farrington <gareth@waves.ky>
2025-05-29 19:01:38 -04:00
..
display display: Add support for AIP31068 based displays (#6639) 2024-12-02 13:23:46 -05:00
__init__.py klippy: Add support for dynamic loading of python modules 2018-01-28 12:19:26 -05:00
ad5206.py extras: Use "from . import module" for relative imports 2020-06-15 17:15:53 -04:00
adc_scaled.py mcu: Rename setup_minmax() to setup_adc_sample() 2024-06-21 15:32:30 -04:00
adc_temperature.py adc_temperature: Enhance "ADC out of range" error reports 2024-06-21 15:32:30 -04:00
ads1x1x.py ads1x1x: added support for ADC chip (#6584) 2025-01-21 19:10:39 -05:00
ads1220.py load_cell: Load cell gram scale (#6729) 2025-03-20 19:53:44 -04:00
adxl345.py adxl345: Allow read and write 127 register address 2025-04-03 14:08:23 -04:00
aht10.py aht10: update comments and docs for AHT20/AHT21 support 2023-04-24 11:10:00 -04:00
angle.py angle: mt6826s added support 2024-12-12 14:28:45 -05:00
axis_twist_compensation.py axis_twist_compensation: Fix AttributeError on klippy connect state (#6881) 2025-04-05 21:36:35 -04:00
bed_mesh.py bed_mesh: Support toolhead positions with more than 4 axes 2025-05-12 20:15:03 -04:00
bed_screws.py bed_screws: Reset on move error 2023-11-02 13:08:53 -04:00
bed_tilt.py bed_tilt: Support toolhead positions with more than 4 axes 2025-05-12 20:15:03 -04:00
bltouch.py probe: Remove ProbeEndstopSessionHelper 2025-04-18 14:38:34 -04:00
bme280.py bme680: measure gas VOC once a while 2024-08-16 22:21:12 -04:00
board_pins.py board_pins: Use config list helpers 2021-08-21 18:08:11 -04:00
bulk_sensor.py sensor_bulk: Change maximum data size from 52 to 51 bytes 2024-06-10 12:27:12 -04:00
bus.py i2c_software: pass pulse ticks from host 2025-04-17 11:41:49 -04:00
buttons.py buttons: fixes incorrect parameters 2025-03-21 13:36:27 -04:00
canbus_ids.py canbus_ids: Use 4 as the first nodeid to reduce id bitstuffing 2022-07-29 11:40:54 -04:00
canbus_stats.py usb_canbus: Detect canbus stalls when in usb to canbus bridge mode 2025-02-02 18:43:34 -05:00
controller_fan.py fan: Support calling set_speed() without a print_time 2024-09-30 12:23:24 -04:00
dac084S085.py dac084S085: SPI DAC DAC084S085 implementation (#5134) 2022-02-22 10:28:28 -05:00
delayed_gcode.py klippy: Rename try_load_module() to load_object() 2020-05-08 11:05:14 -04:00
delta_calibrate.py delta_calibrate: Fix Python3 error in DELTA_ANALYZE 2022-06-13 13:51:07 -04:00
display_status.py display_status: Implement SET_DISPLAY_TEXT command 2022-06-27 10:09:02 -04:00
dotstar.py led: Generalize template evaluation so it is not dependent on LEDs 2024-09-30 12:23:24 -04:00
ds18b20.py ds18b20: fix string conversion error on startup (#5559) 2022-06-08 18:05:27 -04:00
duplicate_pin_override.py duplicate_pin_override: Use config.getlist() for pins config option 2021-08-21 18:08:11 -04:00
endstop_phase.py kinematics: Generic Cartesian kinematics implementation (#6815) 2025-05-06 18:06:36 -04:00
error_mcu.py error_mcu: Support mechanism to add per-instance context to a shutdown 2024-06-21 15:32:30 -04:00
exclude_object.py exclude_object: Support toolhead positions with more than 4 axes 2025-05-12 20:15:03 -04:00
extruder_stepper.py extruder_stepper: Support configuring pressure advance from config 2022-09-01 14:53:12 -04:00
fan.py fan: Fix restart request handling 2024-10-01 11:43:27 -04:00
fan_generic.py fan_generic: Fix handling of template rendering errors 2025-03-25 18:45:12 -04:00
filament_motion_sensor.py buttons: Debounce gcode_button and filament_switch_sensor (#6848) 2025-03-20 19:55:33 -04:00
filament_switch_sensor.py buttons: Debounce gcode_button and filament_switch_sensor (#6848) 2025-03-20 19:55:33 -04:00
firmware_retraction.py gcode: Update gcode descriptions (#4335) 2021-06-02 10:45:27 -04:00
force_move.py force_move: No need to pass 4 parameters to toolhead.set_position() 2025-05-12 20:15:03 -04:00
garbage_collection.py garbage_collection: freeze objects on klippy ready (#6794) 2025-02-02 18:40:43 -05:00
gcode_arcs.py gcode_arc: merge coords gen & G1 emit 2024-08-12 13:06:28 -04:00
gcode_button.py buttons: Debounce gcode_button and filament_switch_sensor (#6848) 2025-03-20 19:55:33 -04:00
gcode_macro.py gcode_macro: more descriptive "unable to parse as a literal" error - display faulty command 2025-05-08 11:37:38 -04:00
gcode_move.py gcode_move: Support additional toolhead axes 2025-05-12 20:15:03 -04:00
hall_filament_width_sensor.py hall_filament_width_sensor: Add filament switch values to status 2025-04-17 11:44:26 -04:00
heater_bed.py heaters: Make sure set_temp() command wakes up the idle_timeout 2021-03-05 18:59:01 -05:00
heater_fan.py fan: Support calling set_speed() without a print_time 2024-09-30 12:23:24 -04:00
heater_generic.py klippy: Rename try_load_module() to load_object() 2020-05-08 11:05:14 -04:00
heaters.py heaters: Confirm heater setting in mcu every 3 seconds instead of 5 2025-04-28 19:28:52 -04:00
homing.py kinematics: Generic Cartesian kinematics implementation (#6815) 2025-05-06 18:06:36 -04:00
homing_heaters.py homing_heaters: Use config.getlist() for heaters and steppers config options 2021-08-21 18:08:11 -04:00
homing_override.py toolhead: Pass set_position() homing_axes parameter as a string 2025-01-21 18:58:23 -05:00
htu21d.py klippy: Replace deprecated logger.warn with logger.warning (#6385) 2023-11-16 22:06:13 -05:00
hx71x.py load_cell: Load cell gram scale (#6729) 2025-03-20 19:53:44 -04:00
icm20948.py icm20948: Formatting refactor 2025-04-03 14:08:23 -04:00
idle_timeout.py klippy: remove a few unused variable assignments (#6504) 2024-04-05 17:43:43 -04:00
input_shaper.py dual_carriage: Fixed input shaper stepper kinematics initialization 2025-05-22 14:44:09 -04:00
ldc1612.py ldc_1612: Supports configurable external crystal frequency (#6734) 2025-03-29 21:53:52 -04:00
led.py led: Use mcu.min_schedule_time() and mcu.max_nominal_duration() 2025-04-28 19:28:52 -04:00
lis2dw.py lis2dw: if spi is used - disable i2c 2025-05-26 18:44:29 -04:00
lis3dh.py sensor_lis2dw: add lis3dh sensor and i2c communication 2024-11-12 19:50:48 -05:00
lm75.py lm75: round reported temps to 2 decimal places 2021-10-15 18:01:19 -04:00
load_cell.py load_cell: Load cell gram scale (#6729) 2025-03-20 19:53:44 -04:00
manual_probe.py generic_cartesian: Fixed safe_z_home and manual_probe for new kinematics 2025-05-10 20:16:00 -04:00
manual_stepper.py manual_stepper: Support LIMIT_VELOCITY and LIMIT_ACCEL when using gcode axis 2025-05-12 20:15:03 -04:00
mcp4018.py mcp4018: Add SET_DIGIPOT command to mcp4018 implementation (#5737) 2022-09-02 10:30:06 -04:00
mcp4451.py extras: Use "from . import module" for relative imports 2020-06-15 17:15:53 -04:00
mcp4728.py extras: Use "from . import module" for relative imports 2020-06-15 17:15:53 -04:00
motion_report.py motion_report: Don't negate step_distance on steppers with inverted dir pin 2024-04-02 21:53:13 -04:00
mpu9250.py adxl345: Fix read_axes_map() for non-adxl345 accelerometers 2024-04-29 12:07:28 -04:00
multi_pin.py mcu: Remove support for set_pwm() cycle_time parameter 2024-01-23 20:04:03 -05:00
neopixel.py led: Generalize template evaluation so it is not dependent on LEDs 2024-09-30 12:23:24 -04:00
output_pin.py output_pin: Use mcu.min_schedule_time() and mcu.max_nominal_duration() 2025-04-28 19:28:52 -04:00
palette2.py palette2: Fix errors with bad handling of NoneType in a few locations 2022-12-31 21:03:37 -05:00
pause_resume.py pause_resume: Do not clobber default state name by accident (#5156) 2022-01-16 13:00:24 -05:00
pca9533.py led: Generalize template evaluation so it is not dependent on LEDs 2024-09-30 12:23:24 -04:00
pca9632.py led: Generalize template evaluation so it is not dependent on LEDs 2024-09-30 12:23:24 -04:00
pid_calibrate.py pid_calibrate: Fix PID_CALIBRATE command when used with heater_generic 2024-03-13 21:41:04 -04:00
print_stats.py print_stats: add SET_PRINT_STATS_INFO G-Code for pass slicer variables to Klipper (#5726) 2022-10-05 15:02:28 -04:00
probe.py generic_cartesian: Fixed safe_z_home and manual_probe for new kinematics 2025-05-10 20:16:00 -04:00
probe_eddy_current.py probe_eddy_current: Separate probe style commands from homing operations 2025-04-18 14:38:34 -04:00
pulse_counter.py pulse_counter: Use "clock" suffix instead of "time" in commands 2021-04-30 11:40:37 -04:00
pwm_cycle_time.py pwm_cycle_time: Use mcu.min_schedule_time() and mcu.max_nominal_duration() 2025-04-28 19:28:52 -04:00
pwm_tool.py pwm_tool: Use mcu.min_schedule_time() and mcu.max_nominal_duration() 2025-04-28 19:28:52 -04:00
quad_gantry_level.py quad_gantry_level: Use config.getlists() for gantry_corners config option 2021-08-21 18:08:11 -04:00
query_adc.py query_adc: Use new GCodeCommand wrappers 2020-05-05 11:08:11 -04:00
query_endstops.py gcode_macro: Use deepcopy() on get_status() results 2021-01-20 16:25:25 -05:00
replicape.py configfile: Allow getchoice() to take a list 2024-06-17 13:49:05 -04:00
resonance_tester.py resonance_tester: Fix typo 2025-05-13 11:14:30 -04:00
respond.py respond: No forced spaces (#5152) 2022-06-30 13:56:35 -04:00
safe_z_home.py generic_cartesian: Fixed safe_z_home and manual_probe for new kinematics 2025-05-10 20:16:00 -04:00
samd_sercom.py samd_sercom: Specify the sercom explicitly in a config option 2021-07-04 09:48:45 -04:00
save_variables.py save_variables: Check lowercase variable names 2025-02-02 18:52:02 -05:00
screws_tilt_adjust.py screws_tilt_adjust: initialize status result as a dictionary 2025-01-24 19:13:36 -05:00
sdcard_loop.py loop_sdcard: Add loopable SD card file sections 2021-05-26 11:57:57 -04:00
servo.py output_pin: Improve GCodeRequestQueue timing on duplicate requests 2024-09-16 13:31:14 -04:00
shaper_calibrate.py resonance_tester: Added a new sweeping_vibrations resonance test method (#6723) 2024-12-05 21:54:26 -05:00
shaper_defs.py input_shaper: Define input shapers in a single place in Python code 2021-10-26 16:14:50 -04:00
sht3x.py sht3x: use periodic report mode (#6634) 2024-07-06 18:28:45 -04:00
skew_correction.py skew_correction: Support toolhead positions with more than 4 axes 2025-05-12 20:15:03 -04:00
smart_effector.py probe: Remove ProbeEndstopSessionHelper 2025-04-18 14:38:34 -04:00
sos_filter.py sos_filter: Second Order Sections MCU Filter 2025-05-29 19:01:38 -04:00
spi_temperature.py klippy: Replace deprecated logger.warn with logger.warning (#6385) 2023-11-16 22:06:13 -05:00
static_digital_output.py mcu: Remove support for "static" pins 2024-01-23 20:04:03 -05:00
statistics.py statistics: Improve Python3 compatibility 2021-12-15 11:27:08 -05:00
stepper_enable.py force_move: Use strings for axes to clear in clear_homing_state() 2025-01-21 18:58:23 -05:00
sx1509.py sx1509: drop i2c_modify_bits 2024-09-22 19:23:14 -04:00
temperature_combined.py temperature_combined: avoid crash with temperature monitors 2025-04-05 21:27:37 -04:00
temperature_fan.py fan: Support calling set_speed() without a print_time 2024-09-30 12:23:24 -04:00
temperature_host.py temperature_host: Remove support for deprecated rpi_temperature alias 2021-11-02 12:45:11 -04:00
temperature_mcu.py temperature_mcu: Add support for rp2350 MCUs 2024-11-14 11:17:52 -05:00
temperature_probe.py temperature_probe: add max_valid_temp option 2024-09-01 13:37:35 -04:00
temperature_sensor.py temperature_sensor: round reported temps to 2 decimal places 2021-10-15 18:01:19 -04:00
temperature_sensors.cfg sht3x: Add sht31 support (#6560) 2024-04-20 18:42:31 -04:00
thermistor.py klippy: Replace deprecated logger.warn with logger.warning (#6385) 2023-11-16 22:06:13 -05:00
tmc.py tmc: Remove code that could read microsteps in tmc config sections 2024-05-16 12:29:52 -04:00
tmc2130.py tmc: add missing freewheel config options 2025-04-17 11:42:44 -04:00
tmc2208.py tmc: add missing freewheel config options 2025-04-17 11:42:44 -04:00
tmc2209.py tmc: add missing freewheel config options 2025-04-17 11:42:44 -04:00
tmc2240.py tmc2240: Allow the slope_control field to be configured via printer.cfg 2025-01-10 12:29:41 -05:00
tmc2660.py tmc: SET_TMC_FIELD VELOCITY 2023-03-20 10:58:25 -04:00
tmc5160.py tmc5160: csactual -> cs_actual 2024-05-21 20:31:23 -04:00
tmc_uart.py tmc: SET_TMC_FIELD VELOCITY 2023-03-20 10:58:25 -04:00
tsl1401cl_filament_width_sensor.py mcu: Rename setup_minmax() to setup_adc_sample() 2024-06-21 15:32:30 -04:00
tuning_tower.py tuning_tower: add is_active() method 2022-06-03 14:12:04 -04:00
verify_heater.py docs: Move config reference information to new Config_Reference.md 2020-11-18 20:10:21 -05:00
virtual_sdcard.py virtual_sdcard: Define a default for on_gcode_error 2024-04-15 14:10:36 -04:00
z_thermal_adjust.py z_thermal_adjust: Support toolhead positions with more than 4 axes 2025-05-12 20:15:03 -04:00
z_tilt.py z_tilt: return done when reties is 0 (#6766) 2024-12-19 15:24:44 -05:00