feat(Preheat): add chamber temperature (M141) support to preheat gcode#2382
Merged
meteyou merged 1 commit intomainsail-crew:developfrom Jan 7, 2026
Merged
Conversation
…e button Signed-off-by: Stefan Dej <meteyou@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds chamber temperature support to the preheat gcode functionality by enabling the M141 command to be included in preheat gcode when the file metadata contains chamber_temp and the printer supports the M141 command.
Key changes:
- Added M141 (chamber temperature) to the list of supported preheat commands
- Implemented dynamic filtering to only include preheat commands that are available in Klipper's gcode.commands
- Moved the preheat_gcode_objects definition outside the file iteration loop for better performance
mryel00
approved these changes
Jan 7, 2026
|
It's amazing! thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds chamber temperature support to the preheat gcode button. When a G-code file contains
chamber_tempmetadata (from slicers like PrusaSlicer), the preheat button will now also sendM141 S<temp>to set the chamber temperature.Key implementation detail: The M141 command is only added if Klipper reports M141 as an available G-code command. This ensures backward compatibility with printers that don't have a chamber heater macro configured. Example for a M141 macro:
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
n/a