filament_switch_sensor: report "enabled" state via get_status

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2020-08-01 11:22:26 -04:00 committed by KevinOConnor
parent c22d5b2444
commit d37374974d
1 changed files with 3 additions and 1 deletions

View File

@ -89,7 +89,9 @@ class RunoutHelper:
(self.name, eventtime))
self.reactor.register_callback(self._runout_event_handler)
def get_status(self, eventtime):
return {"filament_detected": bool(self.filament_present)}
return {
"filament_detected": bool(self.filament_present),
"enabled": bool(self.sensor_enabled)}
cmd_QUERY_FILAMENT_SENSOR_help = "Query the status of the Filament Sensor"
def cmd_QUERY_FILAMENT_SENSOR(self, gcmd):
if self.filament_present: