Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Commit

Permalink
dda.c: simplify copy of startpoint.
Browse files Browse the repository at this point in the history
This reduces binary size by 26 bytes without drawback.

  ATmega sizes               '168   '328(P)   '644(P)     '1280
  Program:  19526 bytes      137%       64%       31%       16%
     Data:   2175 bytes      213%      107%       54%       27%
   EEPROM:     32 bytes        4%        2%        2%        1%
  • Loading branch information
Traumflug committed Nov 27, 2016
1 parent 6d95620 commit 974c4b7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dda.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,9 +974,6 @@ void update_current_position() {
current_position.F = dda->endpoint.F;
}
else {
for (i = X; i < AXIS_COUNT; i++) {
current_position.axis[i] = startpoint.axis[i];
}
current_position.F = startpoint.F;
memcpy(&current_position, &startpoint, sizeof(TARGET));
}
}

0 comments on commit 974c4b7

Please sign in to comment.