MMU: Revert changes to execute_extruder_sequence loop

The previous for-loop is more memory efficient and saves 20 bytes of Flash
This commit is contained in:
Guðni Már Gilbert 2024-03-28 23:36:23 +00:00 committed by gudnimg
parent 61b4270129
commit 09f1d85e9c
1 changed files with 3 additions and 1 deletions

View File

@ -948,8 +948,10 @@ void MMU2::execute_extruder_sequence(const E_Step *sequence, uint8_t stepCount)
planner_synchronize();
// Plan the moves
for (const E_Step *step = sequence, *end = sequence + stepCount; step != end; step++) {
const E_Step *step = sequence;
for (uint8_t i = stepCount; i > 0; --i) {
extruder_move(pgm_read_float(&(step->extrude)), pgm_read_float(&(step->feedRate)));
step++;
}
// Wait for the moves to finish