mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 22:54:10 -06:00
gcode: Add minval/maxval/above/below options to get_X parsers
Add value checking to gcode parameter parsing code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
8f4f5da11c
commit
d5dc6b785d
5 changed files with 53 additions and 45 deletions
|
@ -102,7 +102,7 @@ class VirtualSD:
|
|||
# Set SD position
|
||||
if self.work_timer is not None:
|
||||
raise self.gcode.error("SD busy")
|
||||
pos = self.gcode.get_int('S', params)
|
||||
pos = self.gcode.get_int('S', params, minval=0)
|
||||
self.file_position = pos
|
||||
def cmd_M27(self, params):
|
||||
# Report SD print status
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue