aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/homing_heaters.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-08-19 15:08:56 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-08-21 18:08:11 -0400
commit8a556f2581736dff3c8aee727c1282bd7257ab66 (patch)
tree3e516bc499695c549e6fa9d73cb8af811fe308ba /klippy/extras/homing_heaters.py
parent65fb494e7769fdd75be49abd1b82b17fa79ea37d (diff)
downloadkutter-8a556f2581736dff3c8aee727c1282bd7257ab66.tar.gz
kutter-8a556f2581736dff3c8aee727c1282bd7257ab66.tar.xz
kutter-8a556f2581736dff3c8aee727c1282bd7257ab66.zip
homing_heaters: Use config.getlist() for heaters and steppers config options
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/homing_heaters.py')
-rw-r--r--klippy/extras/homing_heaters.py24
1 files changed, 9 insertions, 15 deletions
diff --git a/klippy/extras/homing_heaters.py b/klippy/extras/homing_heaters.py
index ea8c7df3..4bb9ba04 100644
--- a/klippy/extras/homing_heaters.py
+++ b/klippy/extras/homing_heaters.py
@@ -15,38 +15,32 @@ class HomingHeaters:
self.handle_homing_move_begin)
self.printer.register_event_handler("homing:homing_move_end",
self.handle_homing_move_end)
- self.heaters_to_disable = config.get("heaters", "")
- self.disable_heaters = []
- self.steppers_needing_quiet = config.get("steppers", "")
- self.flaky_steppers = []
+ self.disable_heaters = config.getlist("heaters", None)
+ self.flaky_steppers = config.getlist("steppers", None)
self.pheaters = self.printer.load_object(config, 'heaters')
self.target_save = {}
def handle_connect(self):
# heaters to disable
all_heaters = self.pheaters.get_all_heaters()
- self.disable_heaters = [n.strip()
- for n in self.heaters_to_disable.split(',')]
- if self.disable_heaters == [""]:
+ if self.disable_heaters is None:
self.disable_heaters = all_heaters
else:
if not all(x in all_heaters for x in self.disable_heaters):
raise self.printer.config_error(
- "One or more of these heaters are unknown: %s" % (
- self.disable_heaters))
+ "One or more of these heaters are unknown: %s"
+ % (self.disable_heaters,))
# steppers valid?
kin = self.printer.lookup_object('toolhead').get_kinematics()
all_steppers = [s.get_name() for s in kin.get_steppers()]
- self.flaky_steppers = [n.strip()
- for n in self.steppers_needing_quiet.split(',')]
- if self.flaky_steppers == [""]:
+ if self.flaky_steppers is None:
return
if not all(x in all_steppers for x in self.flaky_steppers):
raise self.printer.config_error(
- "One or more of these steppers are unknown: %s" % (
- self.flaky_steppers))
+ "One or more of these steppers are unknown: %s"
+ % (self.flaky_steppers,))
def check_eligible(self, endstops):
- if self.flaky_steppers == [""]:
+ if self.flaky_steppers is None:
return True
steppers_being_homed = [s.get_name()
for es in endstops