mirror of https://github.com/Desuuuu/klipper.git
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 <kevin@koconnor.net>
This commit is contained in:
parent
6dc623b35d
commit
c128a9dfd5
|
@ -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,10 +74,9 @@ 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),
|
||||
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
|
||||
|
|
|
@ -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,9 +53,9 @@ 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",
|
||||
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(
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue