voidtrance / voron-klipper-extensions

A set of Klipper extensions designed to improve operation of Voron printers.
GNU General Public License v3.0
111 stars 8 forks source link

[FEATURE]Multiple settling samples #15

Open Fuechsl opened 1 week ago

Fuechsl commented 1 week ago

Is your feature request related to a problem? Please describe. As described here my printer configuration (bed, gantry, whatever) sometimes needs more than 1 settling sample

Describe the solution you'd like it would be great to be able to pass a parameter for the number of settling samples to the script.

Describe alternatives you've considered I've considered just modify the script myself so on my printer it does 2 settling samples instead of 1.

Additional context Since I can't write python code, I've asked ChatGPT for the changes I would have to do. It said to add this line:

self.settling_sample_count = config.getint('settling_sample_count', 1) if self.settling_sample else 0

to SettlingProbeSessionHelper.init

and

for i in range(self.settling_sample_count): gcmd.respond_info(f"Performing settling sample {i + 1} of {self.settling_sample_count}...") pos = self._probe(speed) toolhead.manual_move(probexy + [pos[2] + sample_retract_dist], lift_speed)

to _run_settling_probe.

What do you think?

voidtrance commented 1 week ago

ChatGPT is almost correct. I mean, what it suggests will work but it's not as clean as it can be. I can try to add this to the extension in the next week.