aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/filament_switch_sensor.py
Commit message (Collapse)AuthorAgeFilesLines
* buttons: Debounce gcode_button and filament_switch_sensor (#6848)Gareth Farrington2025-03-201-8/+11
| | | | | Add `debounce_delay` config option which sets the debounce time, defaults to 0 Signed-off-by: Gareth Farrington <gareth@waves.ky>
* filament_switch_sensor: report "enabled" state via get_statusArksine2020-08-011-1/+3
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* klippy: Rename try_load_module() to load_object()Kevin O'Connor2020-05-081-3/+3
| | | | | | | | 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>
* filament_switch_sensor: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-4/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* filament_switch_sensor: Query "printing" status instead of tracking itKevin O'Connor2020-02-171-27/+9
| | | | | | | It's simpler to query the "printing" status from the idle_timeout module on an event than it is to track changes to the printing status. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* filament_switch_sensor: Collapse event disable flagsKevin O'Connor2020-02-171-12/+6
| | | | | | | | | | | | | | Introduce min_event_systime and rework the previous start_time, last_event_time, and event_running flags into this one state tracking variable. This also makes a minor change to the behavior of the event_delay - it is now calculated from the time the command completes execution (instead of from when the event is first detected). This may make a difference if there is a long running g-code command occurring during the detection event. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* filament_switch_sensor: Minor optimization to note_filament_present()Kevin O'Connor2020-02-171-5/+6
| | | | | | | Avoid calling into the OS to obtain the system time if the filament state hasn't changed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* filament_switch_sensor: Add a get_status() methodArksine2020-02-171-0/+3
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* filament_switch_sensor: Execute events using reactor callbacksArksine2020-02-171-4/+5
| | | | | | This removes the possibility of re-entry to callers of note_filament_present(). Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* filament_switch_sensor: Replace BaseSensor with RunoutHelperArksine2020-02-171-62/+58
| | | | | | | | Rather than inherit from the BaseSensor, filament sensor implementatons may instantiate the RunoutHelper and update the filament state via its note_filament_present method. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* filament_switch_sensor: Add a delay between dispatch of pause and execution ↵Arksine2019-09-081-0/+2
| | | | | | of pause gcode Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* filament_switch_sensor: add SET_FILAMENT_SENSOR gcodeArksine2019-07-101-2/+13
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* filament_switch_sensor: postfix M400 to scriptArksine2019-07-101-1/+1
| | | | | | Finish Moves needs be a hard requirement for the event gcodes, as it eliminates the possiblility of an event firing while the gcode is executing. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* filament_switch_sensor: remove stale _hande_ready call in the BaseSensorArksine2019-07-101-3/+0
| | | | | | The toolhead attribute is no longer required by the BaseSensor class Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* filament_switch_sensor: Use template evaluation on gcodeKevin O'Connor2019-06-071-10/+14
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* filament_runout_sensor: Auto load pause_resume module if pause_on_runout enabledKevin O'Connor2019-06-071-2/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* filament_switch_sensor: initial implementation of switch based filament ↵Arksine2019-03-011-0/+124
runout/insert sensor This implementation includes a BaseSensor class that all underlying sensor implementations should subclass. Signed-off-by: Eric Callahan <arksine.code@gmail.com>