More logging of matrix behavior

This commit is contained in:
Scott Lahteine 2016-04-11 00:06:33 -07:00
parent 7f265db3ef
commit fdee2be49c

View File

@ -1351,8 +1351,14 @@ static void setup_for_endstop_move() {
#if DISABLED(DELTA) #if DISABLED(DELTA)
static void set_bed_level_equation_lsq(double* plane_equation_coefficients) { static void set_bed_level_equation_lsq(double* plane_equation_coefficients) {
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("BEFORE set_bed_level_equation_lsq", current_position); plan_bed_level_matrix.set_to_identity();
if (DEBUGGING(LEVELING)) {
vector_3 uncorrected_position = plan_get_position();
DEBUG_POS(">>> set_bed_level_equation_lsq", uncorrected_position);
DEBUG_POS(">>> set_bed_level_equation_lsq", current_position);
}
#endif #endif
vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1); vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
@ -1371,7 +1377,7 @@ static void setup_for_endstop_move() {
current_position[Z_AXIS] = corrected_position.z; current_position[Z_AXIS] = corrected_position.z;
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("AFTER set_bed_level_equation_lsq", current_position); if (DEBUGGING(LEVELING)) DEBUG_POS("<<< set_bed_level_equation_lsq", current_position);
#endif #endif
sync_plan_position(); sync_plan_position();
@ -3059,7 +3065,11 @@ inline void gcode_G28() {
#else //!DELTA #else //!DELTA
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("BEFORE matrix.set_to_identity", current_position); if (DEBUGGING(LEVELING)) {
vector_3 corrected_position = plan_get_position();
DEBUG_POS("BEFORE matrix.set_to_identity", corrected_position);
DEBUG_POS("BEFORE matrix.set_to_identity", current_position);
}
#endif #endif
//vector_3 corrected_position = plan_get_position(); //vector_3 corrected_position = plan_get_position();
@ -3071,7 +3081,7 @@ inline void gcode_G28() {
current_position[Z_AXIS] = uncorrected_position.z; current_position[Z_AXIS] = uncorrected_position.z;
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("AFTER matrix.set_to_identity", current_position); if (DEBUGGING(LEVELING)) DEBUG_POS("AFTER matrix.set_to_identity", uncorrected_position);
#endif #endif
sync_plan_position(); sync_plan_position();