mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-08 07:27:43 -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
|
@ -4,6 +4,7 @@
|
|||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import os, re, logging, collections
|
||||
import homing
|
||||
|
||||
# Parse out incoming GCode and find and translate head movements
|
||||
class GCodeParser:
|
||||
|
@ -223,7 +224,10 @@ class GCodeParser:
|
|||
self.last_position[p] = v + self.base_position[p]
|
||||
if 'F' in params:
|
||||
self.speed = float(params['F']) / 60.
|
||||
self.toolhead.move(self.last_position, self.speed, sloppy)
|
||||
try:
|
||||
self.toolhead.move(self.last_position, self.speed, sloppy)
|
||||
except homing.EndstopError, e:
|
||||
self.respond("Error: %s" % (e,))
|
||||
def cmd_G4(self, params):
|
||||
# Dwell
|
||||
if 'S' in params:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue