🐛 Fix MMU3 resume position (#28148)
This commit is contained in:
@@ -255,7 +255,7 @@ namespace MMU3 {
|
||||
uint8_t block_index = planner.block_buffer_tail;
|
||||
while (block_index != planner.block_buffer_head) {
|
||||
block = &planner.block_buffer[block_index];
|
||||
if (block->steps[E_AXIS] != 0) e_active++;
|
||||
if (block->steps.e != 0) e_active++;
|
||||
block_index = (block_index + 1) & (BLOCK_BUFFER_SIZE - 1);
|
||||
}
|
||||
}
|
||||
@@ -760,10 +760,10 @@ namespace MMU3 {
|
||||
LogEchoEvent(F("Resuming XYZ"));
|
||||
|
||||
// Move XY to starting position, then Z
|
||||
motion_do_blocking_move_to_xy(resume_position.x, resume_position.x, feedRate_t(NOZZLE_PARK_XY_FEEDRATE));
|
||||
motion_blocking_move_xy(resume_position.x, resume_position.y, feedRate_t(NOZZLE_PARK_XY_FEEDRATE));
|
||||
|
||||
// Move Z_AXIS to saved position
|
||||
motion_do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
|
||||
motion_blocking_move_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
|
||||
|
||||
// From this point forward, power panic should not use
|
||||
// the partial backup in RAM since the extruder is no
|
||||
|
||||
@@ -46,8 +46,8 @@ namespace MMU3 {
|
||||
void planner_set_current_position_E(float e);
|
||||
xyz_pos_t planner_current_position();
|
||||
|
||||
void motion_do_blocking_move_to_xy(float rx, float ry, float feedRate_mm_s);
|
||||
void motion_do_blocking_move_to_z(float z, float feedRate_mm_s);
|
||||
void motion_blocking_move_xy(float rx, float ry, float feedRate_mm_s);
|
||||
void motion_blocking_move_z(float z, float feedRate_mm_s);
|
||||
|
||||
void nozzle_park();
|
||||
|
||||
|
||||
@@ -103,14 +103,13 @@ namespace MMU3 {
|
||||
return xyz_pos_t(current_position);
|
||||
}
|
||||
|
||||
void motion_do_blocking_move_to_xy(float rx, float ry, float feedRate_mm_s) {
|
||||
current_position[X_AXIS] = rx;
|
||||
current_position[Y_AXIS] = ry;
|
||||
void motion_blocking_move_xy(float rx, float ry, float feedRate_mm_s) {
|
||||
current_position.set(rx, ry);
|
||||
planner_line_to_current_position_sync(feedRate_mm_s);
|
||||
}
|
||||
|
||||
void motion_do_blocking_move_to_z(float z, float feedRate_mm_s) {
|
||||
current_position[Z_AXIS] = z;
|
||||
void motion_blocking_move_z(float z, float feedRate_mm_s) {
|
||||
current_position.z = z;
|
||||
planner_line_to_current_position_sync(feedRate_mm_s);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user