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:
Kevin O'Connor 2018-02-16 13:30:49 -05:00
parent 6dc623b35d
commit c128a9dfd5
3 changed files with 12 additions and 13 deletions

View File

@ -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:

View File

@ -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"

View File

@ -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):