pins: assign initial value if configured fix #689

This commit is contained in:
alfrix committed 2022-08-01 21:27:19 -03:00
1 parent 207914a5b5
commit e332ccc22a
1 file changed
+5 -1
+5 -1
View File
@@ -316,7 +316,11 @@ class Printer:
return speed
def get_pin_value(self, pin):
return self.data[pin]["value"] if pin in self.data else 0
if pin in self.data:
return self.data[pin]["value"]
elif pin in self.config and 'value' in self.config[pin]:
return self.config[pin]["value"]
return 0
def get_extruder_count(self):
return self.extrudercount