mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-14 18:28:00 -06:00
klippy: Store printer startup parameters in new "start_args" dictionary
Store pertinent information from the software startup in a dictionary that the various printer components can access instead of in individual variables in the Printer() class. This makes it easier to add future command-line options. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
b80c488d36
commit
268834e4ae
6 changed files with 64 additions and 71 deletions
|
@ -112,8 +112,8 @@ class PrinterHeater:
|
|||
self.min_extrude_temp = config.getfloat(
|
||||
'min_extrude_temp', 170., minval=self.min_temp, maxval=self.max_temp)
|
||||
self.max_power = config.getfloat('max_power', 1., above=0., maxval=1.)
|
||||
self.can_extrude = (self.min_extrude_temp <= 0.
|
||||
or printer.mcu.is_fileoutput())
|
||||
is_fileoutput = printer.get_start_args().get('debugoutput') is not None
|
||||
self.can_extrude = self.min_extrude_temp <= 0. or is_fileoutput
|
||||
self.lock = threading.Lock()
|
||||
self.last_temp = 0.
|
||||
self.last_temp_time = 0.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue