This commit is contained in:
Christopher Mattar 2026-03-04 09:34:49 -05:00 committed by GitHub
commit d770dd23b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 1 deletions

View file

@ -445,6 +445,11 @@ The following information is available in the `quad_gantry_level` object
(this object is available if quad_gantry_level is defined):
- `applied`: True if the gantry leveling process has been run and completed
successfully.
- `z_height`: A list of four numbers indicating the Z actuator positions.
Set to `[0,0,0,0]` if the gantry leveling process has not been run.
- `z_positions`: A list of four numbers indicating the positions at which
the Z probe triggered during a quad gantry level. Set to `[0,0,0,0]` if
the gantry leveling process has not been run.
## query_endstops

View file

@ -34,6 +34,8 @@ class QuadGantryLevel:
raise config.error(
"Need exactly 4 probe points for quad_gantry_level")
self.z_status = z_tilt.ZAdjustStatus(self.printer)
self.z_height = [0,0,0,0]
self.z_positions = [0,0,0,0]
self.z_helper = z_tilt.ZAdjustHelper(config, 4)
self.gantry_corners = config.getlists('gantry_corners', parser=float,
seps=(',', '\n'), count=2)
@ -90,6 +92,9 @@ class QuadGantryLevel:
z_height[2] = self.plot(slope_y_s23, self.gantry_corners[1][1])
z_height[3] = self.plot(slope_y_s23, self.gantry_corners[0][1])
self.z_height = z_height
self.z_positions = z_positions
ainfo = zip(["z","z1","z2","z3"], z_height[0:4])
apos = " ".join(["%s: %06f" % (x) for x in ainfo])
self.gcode.respond_info("Actuator Positions:\n" + apos)
@ -122,7 +127,12 @@ class QuadGantryLevel:
def plot(self,f,x):
return f[0]*x + f[1]
def get_status(self, eventtime):
return self.z_status.get_status(eventtime)
status = {
'z_height': self.z_height,
'z_positions': self.z_positions,
}
status.update(self.z_status.get_status(eventtime))
return status
def load_config(config):
return QuadGantryLevel(config)