Allow gcode commands with preheat options (#274)
* Allow gcode commands with preheat options I use this to run a heatsoak macro during preheat. It moves to bed center, maxes the part cooling fan, and starts my nevermore chamber filter to circulate more air. * Add documentation for preheat gcode
This commit is contained in:
parent
414ac3f211
commit
e1c478be83
@ -86,6 +86,8 @@ z_babystep_values: 0.01, 0.05
|
||||
bed: 40
|
||||
# Temperature for the tools
|
||||
extruder: 195
|
||||
# optional GCode to run when the option is selected
|
||||
gcode: MY_HEATSOAK_MACRO
|
||||
```
|
||||
|
||||
## Menu
|
||||
|
@ -406,6 +406,7 @@ class KlipperScreenConfig:
|
||||
item = {
|
||||
"extruder": cfg.getint("extruder", 0),
|
||||
"bed": cfg.getint("bed", 0),
|
||||
"heater_generic": cfg.getint("heater_generic", 0)
|
||||
"heater_generic": cfg.getint("heater_generic", 0),
|
||||
"gcode": cfg.get("gcode", None)
|
||||
}
|
||||
return item
|
||||
|
@ -131,6 +131,9 @@ class PreheatPanel(ScreenPanel):
|
||||
self.preheat_options[setting]["extruder"])
|
||||
self._printer.set_dev_stat(heater, "target", int(self.preheat_options[setting]["extruder"]))
|
||||
|
||||
if self.preheat_options[setting]['gcode']:
|
||||
self._screen._ws.klippy.gcode_script(self.preheat_options[setting]['gcode'])
|
||||
|
||||
def process_update(self, action, data):
|
||||
if action != "notify_status_update":
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user