Merge pull request #3528 from thinkyhead/rc_fix_bed_level_equation_oopsie
Fix borked set_bed_level_equation_lsq
This commit is contained in:
commit
db86aaf385
|
@ -1413,9 +1413,6 @@ static void setup_for_endstop_move() {
|
||||||
|
|
||||||
static void set_bed_level_equation_lsq(double* plane_equation_coefficients) {
|
static void set_bed_level_equation_lsq(double* plane_equation_coefficients) {
|
||||||
|
|
||||||
vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
|
|
||||||
plan_bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
|
|
||||||
|
|
||||||
//plan_bed_level_matrix.debug("bed level before");
|
//plan_bed_level_matrix.debug("bed level before");
|
||||||
|
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
|
@ -1427,14 +1424,16 @@ static void setup_for_endstop_move() {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vector_3 corrected_position = plan_get_position();
|
vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
|
||||||
|
plan_bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
|
||||||
|
|
||||||
|
vector_3 corrected_position = plan_get_position();
|
||||||
current_position[X_AXIS] = corrected_position.x;
|
current_position[X_AXIS] = corrected_position.x;
|
||||||
current_position[Y_AXIS] = corrected_position.y;
|
current_position[Y_AXIS] = corrected_position.y;
|
||||||
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("<<< set_bed_level_equation_lsq", current_position);
|
if (DEBUGGING(LEVELING)) DEBUG_POS("<<< set_bed_level_equation_lsq", corrected_position);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sync_plan_position();
|
sync_plan_position();
|
||||||
|
|
Loading…
Reference in a new issue