Klipper3d / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
8.99k stars 5.18k forks source link

Add maximum_mcu_duration support to pwm_tool #6420

Closed KevinOConnor closed 6 months ago

KevinOConnor commented 6 months ago

This adds support for maximum_mcu_duration to the pwm_tool.py module. This is intended to allow users to configure a safety check within the mcu to check for lost communication between host and mcu while a power tool is enabled. With the merge of #6410 it should now be possible to implement this check.

I've run some basic tests on this code, but I don't have hardware to test real world cases.

Once this support is added, I will look to deprecate the existing maximum_mcu_duration in the [output_pin] module. (That module has been getting complex, and I think the code may be more maintainable going forward if we can move users that need maximum_mcu_duration to the pwm_tool module.)

@Cirromulus - FYI.

-Kevin

KevinOConnor commented 6 months ago

FYI, I have reworked the code on this branch slightly. The flush notification system is now, hopefully, a little easier to understand.

-Kevin