aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/idle_timeout.py
Commit message (Collapse)AuthorAgeFilesLines
* idle_timeout: change standard timeout g-code (#4018)fleinze2021-03-071-1/+3
| | | | | Machines that have no heaters produce an error when the idle timeout occurs. This commit fixes this by checking if there are any heaters to turn off. Signed-off-by: Florian Heinze <florian@heinze.at>
* idle_timeout: Add help to SET_IDLE_TIMEOUT (#3945)Arjan Mels2021-02-181-1/+3
| | | Signed-off-by: Arjan Mels <github@mels.email>
* klippy: Rename try_load_module() to load_object()Kevin O'Connor2020-05-081-5/+5
| | | | | | | | Rename try_load_module() so that it uses consistent naming for "printer objects". Change the function to raise an error by default if the specified module does not exist. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* idle_timeout: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-7/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Eliminate the process_batch() methodKevin O'Connor2019-06-091-6/+4
| | | | | | | Allow the callers of process_batch() to directly inspect the gcode mutex. Those callers can then directly invoke run_script(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* idle_timeout: Fix typo causing get_status() to failKevin O'Connor2019-06-071-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* idle_timeout: Use template evaluation on gcodeKevin O'Connor2019-06-071-2/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* idle_timeout: Add a get_status() methodKevin O'Connor2019-06-041-1/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* idle_timeout: Add SET_IDLE_TIMEOUT gcodeArksine2019-06-041-0/+12
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* idle_timeout: Added a missing logging importSamori Gorse2019-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed Octoprint was disconnecting after a while, and after reading the logs, I came across this error: ``` Unhandled exception during run Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 171, in run self.reactor.run() File "/home/pi/klipper/klippy/reactor.py", line 176, in run g_next.switch() File "/home/pi/klipper/klippy/reactor.py", line 203, in _dispatch_loop timeout = self._check_timers(eventtime) File "/home/pi/klipper/klippy/reactor.py", line 82, in _check_timers t.waketime = t.callback(eventtime) File "/home/pi/klipper/klippy/extras/idle_timeout.py", line 62, in timeout_handler return self.check_idle_timeout(eventtime) File "/home/pi/klipper/klippy/extras/idle_timeout.py", line 59, in check_idle_timeout return self.transition_idle_state(eventtime) File "/home/pi/klipper/klippy/extras/idle_timeout.py", line 35, in transition_idle_state logging.exception("idle timeout gcode execution") NameError: global name 'logging' is not defined ``` I therefore added the missing import. Signed-off-by: Samori Gorse <samori.gorse+github@gmail.com>
* klippy: Convert printer_state("ready") to an event handlerKevin O'Connor2019-01-081-7/+6
| | | | | | | Convert all users of the printer_state("ready") handler to register a "klippy:ready" event handler instead. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* idle_timeout: Add printing/ready/idle trackingKevin O'Connor2018-10-281-21/+65
| | | | | | | Internally track the overall printer state. Generate events on state transitions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: process_batch() should execute commands atomicallyKevin O'Connor2018-10-281-9/+9
| | | | | | | Update the process_batch() method so that it will not interleave commands read from the input fd with the batched commands. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Add new TURN_OFF_HEATERS commandKevin O'Connor2018-09-181-0/+1
| | | | | | | Add a command that will turn off all heaters in the printer. Run this command in the default idle_timeout action. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* idle_timeout: Move timeout handling from toolhead.py to new extras moduleKevin O'Connor2018-07-161-0/+48
Move the "motor_off_timeout" tracking to a new module in the extras/ directory. This makes it easier to customize the idle timeout behavior. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>