Optimisation: Set lastpos using memcpy directly
Verified the change by running the M600 gcode. All axis move as expected. Change in memory: Flash: -64 bytes SRAM: 0 bytes
This commit is contained in:
parent
f984072eab
commit
db1b0ea9ac
|
|
@ -3536,10 +3536,7 @@ static void gcode_M600(bool automatic, float x_position, float y_position, float
|
|||
float HotendTempBckp = degTargetHotend(active_extruder);
|
||||
int fanSpeedBckp = fanSpeed;
|
||||
|
||||
lastpos[X_AXIS] = current_position[X_AXIS];
|
||||
lastpos[Y_AXIS] = current_position[Y_AXIS];
|
||||
lastpos[Z_AXIS] = current_position[Z_AXIS];
|
||||
lastpos[E_AXIS] = current_position[E_AXIS];
|
||||
memcpy(lastpos, current_position, sizeof(lastpos));
|
||||
|
||||
// Retract E
|
||||
current_position[E_AXIS] += e_shift;
|
||||
|
|
|
|||
Loading…
Reference in New Issue