From c128a9dfd5fc4aceaf67c4212c5323edb4f34068 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 16 Feb 2018 13:30:49 -0500 Subject: [PATCH] probe: Increase calibration log level from debug to info Output more information by default from the bed_tilt and delta_calibrate commands. Signed-off-by: Kevin O'Connor --- klippy/extras/bed_tilt.py | 11 +++++------ klippy/extras/delta_calibrate.py | 12 ++++++------ klippy/extras/probe.py | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/klippy/extras/bed_tilt.py b/klippy/extras/bed_tilt.py index 316f1124..f7e61052 100644 --- a/klippy/extras/bed_tilt.py +++ b/klippy/extras/bed_tilt.py @@ -59,11 +59,11 @@ class BedTiltCalibrate: kin = self.printer.lookup_object('toolhead').get_kinematics() return kin.get_position() def finalize(self, positions): - logging.debug("Got: %s", positions) + logging.info("Calculating bed_tilt with: %s", positions) params = { 'x_adjust': self.bedtilt.x_adjust, 'y_adjust': self.bedtilt.y_adjust, 'z_adjust': self.probe_z_offset } - logging.debug("Params: %s", params) + logging.info("Initial bed_tilt parameters: %s", params) def adjusted_height(pos, params): x, y, z = pos return (z - x*params['x_adjust'] - y*params['y_adjust'] @@ -74,11 +74,10 @@ class BedTiltCalibrate: total_error += adjusted_height(pos, params)**2 return total_error new_params = probe.coordinate_descent(params.keys(), params, errorfunc) - logging.debug("Got2: %s", new_params) + logging.info("Calculated bed_tilt parameters: %s", new_params) for pos in positions: - logging.debug("orig: %s new: %s", - adjusted_height(pos, params), - adjusted_height(pos, new_params)) + logging.info("orig: %s new: %s", adjusted_height(pos, params), + adjusted_height(pos, new_params)) z_warn = "" z_diff = new_params['z_adjust'] - self.probe_z_offset if abs(z_diff) > .010: diff --git a/klippy/extras/delta_calibrate.py b/klippy/extras/delta_calibrate.py index 7953493c..b65a7815 100644 --- a/klippy/extras/delta_calibrate.py +++ b/klippy/extras/delta_calibrate.py @@ -40,9 +40,9 @@ class DeltaCalibrate: return kin.get_stable_position() def finalize(self, positions): kin = self.printer.lookup_object('toolhead').get_kinematics() - logging.debug("Got: %s", positions) + logging.info("Calculating delta_calibrate with: %s", positions) params = kin.get_calibrate_params() - logging.debug("Params: %s", params) + logging.info("Initial delta_calibrate parameters: %s", params) adj_params = ('endstop_a', 'endstop_b', 'endstop_c', 'radius', 'angle_a', 'angle_b') def delta_errorfunc(params): @@ -53,11 +53,11 @@ class DeltaCalibrate: return total_error new_params = probe.coordinate_descent( adj_params, params, delta_errorfunc) - logging.debug("Got2: %s", new_params) + logging.info("Calculated delta_calibrate parameters: %s", new_params) for spos in positions: - logging.debug("orig: %s new: %s", - delta.get_position_from_stable(spos, params), - delta.get_position_from_stable(spos, new_params)) + logging.info("orig: %s new: %s", + delta.get_position_from_stable(spos, params), + delta.get_position_from_stable(spos, new_params)) self.gcode.respond_info( "stepper_a: position_endstop: %.6f angle: %.6f\n" "stepper_b: position_endstop: %.6f angle: %.6f\n" diff --git a/klippy/extras/probe.py b/klippy/extras/probe.py index 05634139..70cc2a1d 100644 --- a/klippy/extras/probe.py +++ b/klippy/extras/probe.py @@ -168,7 +168,7 @@ def coordinate_descent(adj_params, params, error_func): continue params[param_name] = orig dp[param_name] *= 0.9 - logging.debug("best_err: %s rounds: %d", best_err, rounds) + logging.info("Coordinate descent best_err: %s rounds: %d", best_err, rounds) return params def load_config(config):