Skip to content

Commit

Permalink
quad_gantry_level: Require exactly 4 probe points
Browse files Browse the repository at this point in the history
quad_gantry_level requires exactly 4 probe points assert as much at
config time.

Signed-off-by: John "Fess" Fessenden <[email protected]>
  • Loading branch information
fessyfoo authored and KevinOConnor committed May 21, 2019
1 parent 7d2e3de commit 260e4f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion klippy/extras/quad_gantry_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def __init__(self, config):
self.printer.register_event_handler("klippy:connect",
self.handle_connect)
self.probe_helper = probe.ProbePointsHelper(config, self.probe_finalize)
self.probe_helper.minimum_points(3)
if len(self.probe_helper.probe_points) != 4:
raise config.error(
"Need exactly 4 probe points for quad_gantry_level")
gantry_corners = config.get('gantry_corners').split('\n')
try:
gantry_corners = [line.split(',', 1)
Expand Down

0 comments on commit 260e4f5

Please sign in to comment.