Merge pull request #3466 from thinkyhead/rc_look_for_leveling_bug
Add CORE support to st_set_position and plan_set_position
This commit is contained in:
@@ -1351,8 +1351,14 @@ static void setup_for_endstop_move() {
|
||||
#if DISABLED(DELTA)
|
||||
|
||||
static void set_bed_level_equation_lsq(double* plane_equation_coefficients) {
|
||||
|
||||
#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
|
||||
|
||||
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;
|
||||
|
||||
#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
|
||||
|
||||
sync_plan_position();
|
||||
@@ -3059,7 +3065,11 @@ inline void gcode_G28() {
|
||||
#else //!DELTA
|
||||
|
||||
#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
|
||||
|
||||
//vector_3 corrected_position = plan_get_position();
|
||||
@@ -3069,12 +3079,13 @@ inline void gcode_G28() {
|
||||
current_position[X_AXIS] = uncorrected_position.x;
|
||||
current_position[Y_AXIS] = uncorrected_position.y;
|
||||
current_position[Z_AXIS] = uncorrected_position.z;
|
||||
sync_plan_position();
|
||||
|
||||
#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
|
||||
|
||||
sync_plan_position();
|
||||
|
||||
#endif // !DELTA
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user