diff options
author | Arksine <arksine.code@gmail.com> | 2019-09-07 08:33:44 -0400 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2019-09-08 20:42:43 -0400 |
commit | 49779f13a23be766b3a131a285f7fb5447488c74 (patch) | |
tree | fb23c2416a1494c0a7176f8b7b35048d9dc2a547 /klippy | |
parent | a78329d0b24aca97532b8d33355a5cc82d54575d (diff) | |
download | kutter-49779f13a23be766b3a131a285f7fb5447488c74.tar.gz kutter-49779f13a23be766b3a131a285f7fb5447488c74.tar.xz kutter-49779f13a23be766b3a131a285f7fb5447488c74.zip |
filament_switch_sensor: Add a delay between dispatch of pause and execution of pause gcode
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Diffstat (limited to 'klippy')
-rw-r--r-- | klippy/extras/filament_switch_sensor.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/klippy/extras/filament_switch_sensor.py b/klippy/extras/filament_switch_sensor.py index a5b189df..257980a8 100644 --- a/klippy/extras/filament_switch_sensor.py +++ b/klippy/extras/filament_switch_sensor.py @@ -21,6 +21,7 @@ class BaseSensor(object): if config.get('insert_gcode', None) is not None: self.insert_gcode = gcode_macro.load_template( config, 'insert_gcode') + self.pause_delay = config.getfloat('pause_delay', .5, above=.0) self.runout_enabled = False self.insert_enabled = self.insert_gcode is not None self.event_running = False @@ -52,6 +53,7 @@ class BaseSensor(object): pause_resume = self.printer.lookup_object('pause_resume') pause_resume.send_pause_command() pause_prefix = "PAUSE\n" + self.printer.get_reactor().pause(eventtime + self.pause_delay) self._exec_gcode(pause_prefix, self.runout_gcode) self.event_running = False def _insert_event_handler(self, eventtime): |