mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-05 13:04:05 -06:00
cartesian: Enforce endstop min and max boundaries
Verify that each move command is within range of the configured minimum and maximum for each axis. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
275b386856
commit
b53da365a1
4 changed files with 32 additions and 3 deletions
|
@ -90,3 +90,11 @@ class QueryEndstops:
|
|||
msg = "TRIGGERED"
|
||||
msgs.append("%s:%s" % (name, msg))
|
||||
return " ".join(msgs)
|
||||
|
||||
class EndstopError(Exception):
|
||||
def __init__(self, pos, msg="Move out of range"):
|
||||
self.pos = pos
|
||||
self.msg = msg
|
||||
def __str__(self):
|
||||
return "%s: %.3f %.3f %.3f [%.3f]" % (
|
||||
self.msg, self.pos[0], self.pos[1], self.pos[2], self.pos[3])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue