mirror of https://github.com/Desuuuu/klipper.git
filament_switch_sensor: report "enabled" state via get_status
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
c22d5b2444
commit
d37374974d
|
@ -89,7 +89,9 @@ class RunoutHelper:
|
||||||
(self.name, eventtime))
|
(self.name, eventtime))
|
||||||
self.reactor.register_callback(self._runout_event_handler)
|
self.reactor.register_callback(self._runout_event_handler)
|
||||||
def get_status(self, eventtime):
|
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"
|
cmd_QUERY_FILAMENT_SENSOR_help = "Query the status of the Filament Sensor"
|
||||||
def cmd_QUERY_FILAMENT_SENSOR(self, gcmd):
|
def cmd_QUERY_FILAMENT_SENSOR(self, gcmd):
|
||||||
if self.filament_present:
|
if self.filament_present:
|
||||||
|
|
Loading…
Reference in New Issue