aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-05-21 09:40:13 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-05-21 09:40:13 -0400
commit84bae6ff41283a161b16321c72a68813d4ff333a (patch)
tree3efae382c47e04e8d66e671da23d37888f1c9bf1
parent1856f955030de2f1fc00cf82984cbbec0ef006cc (diff)
downloadkutter-84bae6ff41283a161b16321c72a68813d4ff333a.tar.gz
kutter-84bae6ff41283a161b16321c72a68813d4ff333a.tar.xz
kutter-84bae6ff41283a161b16321c72a68813d4ff333a.zip
mcu: Fix reserve pin check
Fix typo causing conflict with mcu name and constant name. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--klippy/mcu.py6
-rw-r--r--test/klippy/temperature.cfg2
2 files changed, 4 insertions, 4 deletions
diff --git a/klippy/mcu.py b/klippy/mcu.py
index 5adfd090..e7c28a03 100644
--- a/klippy/mcu.py
+++ b/klippy/mcu.py
@@ -620,10 +620,10 @@ class MCU:
["%s=%s" % (k, v) for k, v in self.get_constants().items()]))]
logging.info("\n".join(log_info))
ppins = self._printer.lookup_object('pins')
- for name, value in self.get_constants().items():
- if name.startswith("RESERVE_PINS_"):
+ for cname, value in self.get_constants().items():
+ if cname.startswith("RESERVE_PINS_"):
for pin in value.split(','):
- ppins.reserve_pin(name, pin, name[14:])
+ ppins.reserve_pin(name, pin, cname[13:])
self._mcu_freq = self.get_constant_float('CLOCK_FREQ')
self._stats_sumsq_base = self.get_constant_float('STATS_SUMSQ_BASE')
self._emergency_stop_cmd = self.lookup_command("emergency_stop")
diff --git a/test/klippy/temperature.cfg b/test/klippy/temperature.cfg
index 4a81a08c..83e5efa4 100644
--- a/test/klippy/temperature.cfg
+++ b/test/klippy/temperature.cfg
@@ -54,7 +54,7 @@ min_temp: 0
max_temp: 130
[temperature_fan test_max6675]
-pin: ar1
+pin: ar9
min_temp: 0
max_temp: 100
control: watermark