Skip to content

Commit

Permalink
STEAPP-432: added condition for check offset, needed for do not move …
Browse files Browse the repository at this point in the history
…outside coordinate system (#117)

* STEAPP-432:added zeroing z_offset, when changing the module.

* STEAPP-432:added condition for check offset, needed for do not move outside coordinate system.

* STEAPP-432:added condition for check offset, needed for do not move outside coordinate system.

---------

Co-authored-by: Ilya Gushchin <[email protected]>
  • Loading branch information
SokolovJek and frylock34 authored Jun 22, 2023
1 parent b3569a1 commit da3247d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions klippy/extras/gcode_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ def cmd_SET_GCODE_OFFSET(self, gcmd):
if offset is None:
continue
offset += self.homing_position[pos]
if offset > 0.0:
msg = """Offset %f for the %s axis will cause movement
outside the coordinate system.""" % (offset, axis)
gcmd.respond_info(msg)
logging.warning(msg)
continue
delta = offset - self.homing_position[pos]
move_delta[pos] = delta
self.base_position[pos] += delta
Expand Down

0 comments on commit da3247d

Please sign in to comment.