klipper/klippy/extras
Russell Cloran e18091bac3 load_cell_probe: Fix memory leak on some probe failures
In the case where the homing module's `probing_move` raises an
exception, the collector's `_finish_collecting` is never called.
Normally the caller of `LoadCellProbingMove`'s `probing_move` uses the
collector object by calling `collect_until`, which calls
`_finish_collecting` when it is done, but if an exception is raised
before that can be done the collector object keeps receiving samples and
never does anything with them.

This ensures that the collector is stopped if an exception is raised, so
that samples do not accumulate indefinitely.

Signed-off-by: Russell Cloran <rcloran@gmail.com>
2025-08-08 12:05:35 -07:00
..
display klippy: fix typos in python code (#6989) 2025-07-25 12:31:19 -04: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: Rename local 'config' variable to pcfg 2025-07-08 18:55:25 -04:00
ads1220.py sensor_hx71x: Update Sensors to report to load_cell_probe 2025-05-29 19:07:49 -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 klippy: fix typos in python code (#6989) 2025-07-25 12:31:19 -04: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 klippy: fix typos in python code (#6989) 2025-07-25 12:31:19 -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 sht3x: reads should be retried with at least 0.5s pause 2025-07-11 10:46:57 -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 klippy: fix typos in python code (#6989) 2025-07-25 12:31:19 -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: Increase time before clearing the temperature of an inactive heater 2025-07-19 11:24:59 -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: fix typos in python code (#6989) 2025-07-25 12:31:19 -04:00
hx71x.py sensor_hx71x: Update Sensors to report to load_cell_probe 2025-05-29 19:07:49 -04:00
icm20948.py icm20948: Formatting refactor 2025-04-03 14:08:23 -04:00
idle_timeout.py idle_timeout: Add status field for current idle timeout (#6982) 2025-08-01 12:37:47 -04:00
input_shaper.py input_shaper: fix printer obj reference 2025-06-06 15:43:29 -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 klippy: fix typos in python code (#6989) 2025-07-25 12:31:19 -04:00
load_cell_probe.py load_cell_probe: Fix memory leak on some probe failures 2025-08-08 12:05:35 -07: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: Remove support for manual i2c - use standard mcu software i2c instead 2025-07-22 14:04:50 -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 klippy: fix typos in python code (#6989) 2025-07-25 12:31:19 -04: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 pca9632: Remove custom software i2c - use normal mcu software i2c instead 2025-07-22 14:04:50 -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: Fix for filament statistics bug in print_stats.py for toolchangers (#6946) 2025-05-31 13:06:44 -04:00
probe.py probe: Create ProbeVirtualEndstopDeprecation 2025-05-29 19:08:32 -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 klippy: fix typos in python code (#6989) 2025-07-25 12:31:19 -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 klippy: fix typos in python code (#6989) 2025-07-25 12:31:19 -04:00
respond.py respond: No forced spaces (#5152) 2022-06-30 13:56:35 -04:00
safe_z_home.py safe_z_home: correct error call 2025-07-22 14:17:43 -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 docs: Note 'config' object shouldn't be accessed after initial load 2025-06-04 13:46:28 -04: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 klippy: fix typos in python code (#6989) 2025-07-25 12:31:19 -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 klippy: fix typos in python code (#6989) 2025-07-25 12:31:19 -04:00
sos_filter.py klippy: fix typos in python code (#6989) 2025-07-25 12:31:19 -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 klippy: fix typos in python code (#6989) 2025-07-25 12:31:19 -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: fix typos in python code (#6989) 2025-07-25 12:31:19 -04:00
tmc.py tmc.py: add track of stallguard 2025-07-12 16:17:22 -04:00
tmc2130.py tmc.py: add track of stallguard 2025-07-12 16:17:22 -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: Add OTW_OV_VTH to list of ReadRegisters 2025-08-01 12:33:50 -04:00
tmc2660.py tmc.py: add track of stallguard 2025-07-12 16:17:22 -04:00
tmc5160.py tmc5160: csactual -> cs_actual 2024-05-21 20:31:23 -04:00
tmc_uart.py tmc.py: add track of stallguard 2025-07-12 16:17:22 -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 docs: Note 'config' object shouldn't be accessed after initial load 2025-06-04 13:46:28 -04:00
z_tilt.py z_tilt: return done when reties is 0 (#6766) 2024-12-19 15:24:44 -05:00