extrude: add filament sensor support
This commit is contained in:
@@ -125,7 +125,7 @@ class Printer:
|
||||
'motion_report'
|
||||
]
|
||||
|
||||
for x in (self.get_tools() + self.get_heaters()):
|
||||
for x in (self.get_tools() + self.get_heaters() + self.get_filament_sensors()):
|
||||
if x in data:
|
||||
for i in data[x]:
|
||||
self.set_dev_stat(x, i, data[x][i])
|
||||
@@ -242,6 +242,14 @@ class Printer:
|
||||
heaters.append(h)
|
||||
return heaters
|
||||
|
||||
def get_filament_sensors(self):
|
||||
sensors = []
|
||||
for s in self.get_config_section_list("filament_switch_sensor "):
|
||||
sensors.append(s)
|
||||
for s in self.get_config_section_list("filament_motion_sensor "):
|
||||
sensors.append(s)
|
||||
return sensors
|
||||
|
||||
def get_printer_status_data(self):
|
||||
data = {
|
||||
"printer": {
|
||||
|
Reference in New Issue
Block a user