mirror of
https://github.com/andreili/klipper.git
synced 2025-08-23 19:34:06 +02:00
idle_timeout: Add status field for current idle timeout (#6982)
Signed-off-by: Eric Billmeyer <eric.billmeyer@freenet.de>
This commit is contained in:
parent
2cbb895978
commit
d5c031bc13
@ -291,6 +291,9 @@ is always available):
|
||||
- `printing_time`: The amount of time (in seconds) the printer has
|
||||
been in the "Printing" state (as tracked by the idle_timeout
|
||||
module).
|
||||
- `idle_timeout`: The current 'timeout' (in seconds)
|
||||
to wait for the gcode to be triggered.
|
||||
(as set by [SET_IDLE_TIMEOUT](G-Codes.md#set_idle_timeout))
|
||||
|
||||
## led
|
||||
|
||||
|
@ -35,7 +35,9 @@ class IdleTimeout:
|
||||
printing_time = 0.
|
||||
if self.state == "Printing":
|
||||
printing_time = eventtime - self.last_print_start_systime
|
||||
return { "state": self.state, "printing_time": printing_time }
|
||||
return {"state": self.state,
|
||||
"printing_time": printing_time,
|
||||
"idle_timeout": self.idle_timeout}
|
||||
def handle_ready(self):
|
||||
self.toolhead = self.printer.lookup_object('toolhead')
|
||||
self.timeout_timer = self.reactor.register_timer(self.timeout_handler)
|
||||
|
Loading…
x
Reference in New Issue
Block a user