Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions klippy/extras/belay.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ def handle_enable(self):
if not condition():
return
self.enabled = True
self.reactor.update_timer(
self.update_direction_timer, self.reactor.NOW
)
self.reactor.update_timer(self.update_direction_timer, self.reactor.NOW)
self.update_multiplier()

def handle_disable(self):
Expand All @@ -170,9 +168,7 @@ def sensor_callback(self, eventtime, state):
self.last_state = state
if self.enabled:
virtual_sdcard = self.printer.lookup_object("virtual_sdcard")
file_pos = virtual_sdcard.get_status(eventtime).get(
"file_position"
)
file_pos = virtual_sdcard.get_status(eventtime).get("file_position")
if file_pos > 1:
self.timeout = self.reactor.monotonic() + self.stuck_timeout
if self.debug_level >= 1:
Expand Down Expand Up @@ -233,7 +229,8 @@ def update_verify_stuck(self, eventtime) -> float:
if state.lower() == "printing":
if self.debug_level >= 1:
self.gcode.respond_info(
f"Belay stuck with timeout {self.timeout} timer: {self.reactor.monotonic()}"
f"Belay stuck with timeout {self.timeout} "\
f"timer: {self.reactor.monotonic()}"
)

if self.timeout > self.reactor.monotonic():
Expand Down
Loading
Loading