Add a feedRate_t data type (#15349)
This commit is contained in:
@@ -102,8 +102,8 @@ char MMU2::rx_buffer[16], MMU2::tx_buffer[16];
|
||||
#if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
|
||||
|
||||
struct E_Step {
|
||||
float extrude; //!< extrude distance in mm
|
||||
float feedRate; //!< feed rate in mm/s
|
||||
float extrude; //!< extrude distance in mm
|
||||
feedRate_t feedRate; //!< feed rate in mm/s
|
||||
};
|
||||
|
||||
static constexpr E_Step ramming_sequence[] PROGMEM = { MMU2_RAMMING_SEQUENCE };
|
||||
@@ -606,10 +606,10 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
|
||||
BUZZ(200, 404);
|
||||
|
||||
// Move XY to starting position, then Z
|
||||
do_blocking_move_to_xy(resume_position[X_AXIS], resume_position[Y_AXIS], NOZZLE_PARK_XY_FEEDRATE);
|
||||
do_blocking_move_to_xy(resume_position[X_AXIS], resume_position[Y_AXIS], feedRate_t(NOZZLE_PARK_XY_FEEDRATE));
|
||||
|
||||
// Move Z_AXIS to saved position
|
||||
do_blocking_move_to_z(resume_position[Z_AXIS], NOZZLE_PARK_Z_FEEDRATE);
|
||||
do_blocking_move_to_z(resume_position[Z_AXIS], feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
|
||||
}
|
||||
else {
|
||||
BUZZ(200, 404);
|
||||
@@ -783,15 +783,14 @@ void MMU2::filament_runout() {
|
||||
const E_Step* step = sequence;
|
||||
|
||||
for (uint8_t i = 0; i < steps; i++) {
|
||||
const float es = pgm_read_float(&(step->extrude)),
|
||||
fr = pgm_read_float(&(step->feedRate));
|
||||
const float es = pgm_read_float(&(step->extrude));
|
||||
const feedRate_t fr_mm_m = pgm_read_float(&(step->feedRate));
|
||||
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPAIR("E step ", es, "/", fr);
|
||||
DEBUG_ECHOLNPAIR("E step ", es, "/", fr_mm_m);
|
||||
|
||||
current_position[E_AXIS] += es;
|
||||
planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS],
|
||||
current_position[E_AXIS], MMM_TO_MMS(fr), active_extruder);
|
||||
line_to_current_position(MMM_TO_MMS(fr_mm_m));
|
||||
planner.synchronize();
|
||||
|
||||
step++;
|
||||
|
Reference in New Issue
Block a user