From ea330717cde4c05e8952ae3fbb4bec2f11e7672f Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Wed, 19 Jul 2023 22:31:33 +0200 Subject: [PATCH] screws_tilt_adjust: add max_deviation to report status Signed-off-by: Stefan Dej --- docs/Status_Reference.md | 2 ++ klippy/extras/screws_tilt_adjust.py | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/Status_Reference.md b/docs/Status_Reference.md index bff64d18..48aeb0fd 100644 --- a/docs/Status_Reference.md +++ b/docs/Status_Reference.md @@ -386,6 +386,8 @@ object: - `error`: Returns True if the most recent `SCREWS_TILT_CALCULATE` command included the `MAX_DEVIATION` parameter and any of the probed screw points exceeded the specified `MAX_DEVIATION`. +- `max_deviation`: Return the last `MAX_DEVIATION` value of the most + recent `SCREWS_TILT_CALCULATE` command. - `results[""]`: A dictionary containing the following keys: - `z`: The measured Z height of the screw location. - `sign`: A string specifying the direction to turn to screw for the diff --git a/klippy/extras/screws_tilt_adjust.py b/klippy/extras/screws_tilt_adjust.py index 423c4a09..521744af 100644 --- a/klippy/extras/screws_tilt_adjust.py +++ b/klippy/extras/screws_tilt_adjust.py @@ -61,6 +61,7 @@ class ScrewsTiltAdjust: def get_status(self, eventtime): return {'error': self.max_diff_error, + 'max_deviation': self.max_diff, 'results': self.results} def probe_finalize(self, offsets, positions):