Skip to content

pid_calibrate: Register commands during setup - #7443

Open
ManuelMuehlberger wants to merge 1 commit into
Klipper3d:masterfrom
ManuelMuehlberger:fix-pid-calibrate-macro-order
Open

ManuelMuehlberger wants to merge 1 commit into
Klipper3d:masterfrom
ManuelMuehlberger:fix-pid-calibrate-macro-order

Conversation

@ManuelMuehlberger

Copy link
Copy Markdown

This PR fixes a startup error when a PID_CALIBRATE macro with rename_existing appears before the heater configuration. It registers the command as each heater is configured, so it is available when the macro is renamed.

The bug was reported on the Klipper forum.

The PR also adds regression tests with the macro before and after the heaters.

@MRX8024

MRX8024 commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

I’m not sure whether we should add tests for this, but otherwise it looks good.

-Maksim

Register PID_CALIBRATE for each heater during configuration, before gcode_macro rename callbacks run. This allows overriding the command regardless of the order of heater and macro sections.

Signed-off-by: Manuel Mühlberger <tamerlein73@gmail.com>
@ManuelMuehlberger
ManuelMuehlberger force-pushed the fix-pid-calibrate-macro-order branch from 5a4b330 to cd9827b Compare November 29, 2026 21:46
@ManuelMuehlberger

Copy link
Copy Markdown
Author

Thanks for looking at it 🙂. Removing the tests is fine for me, I was not so sure on what the policy on adding regression tests for fixes like this is here.

@ManuelMuehlberger
ManuelMuehlberger marked this pull request as ready for review November 29, 2026 21:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants