Browse Source

Minor optimization of axis_did_move bits

pull/1/head
Scott Lahteine 7 years ago
parent
commit
50fa8e01c1
  1. 16
      Marlin/src/module/stepper.cpp

16
Marlin/src/module/stepper.cpp

@ -1628,13 +1628,15 @@ uint32_t Stepper::stepper_block_phase_isr() {
#define Z_MOVE_TEST !!current_block->steps[C_AXIS] #define Z_MOVE_TEST !!current_block->steps[C_AXIS]
#endif #endif
SET_BIT_TO(axis_did_move, X_AXIS, X_MOVE_TEST); uint8_t axis_bits = 0;
SET_BIT_TO(axis_did_move, Y_AXIS, Y_MOVE_TEST); if (X_MOVE_TEST) SBI(axis_bits, A_AXIS);
SET_BIT_TO(axis_did_move, Z_AXIS, Z_MOVE_TEST); if (Y_MOVE_TEST) SBI(axis_bits, B_AXIS);
//SET_BIT_TO(axis_did_move, E_AXIS, !!current_block->steps[E_AXIS]); if (Z_MOVE_TEST) SBI(axis_bits, C_AXIS);
//SET_BIT_TO(axis_did_move, X_HEAD, !!current_block->steps[A_AXIS]); //if (!!current_block->steps[E_AXIS]) SBI(axis_bits, E_AXIS);
//SET_BIT_TO(axis_did_move, Y_HEAD, !!current_block->steps[B_AXIS]); //if (!!current_block->steps[A_AXIS]) SBI(axis_bits, X_HEAD);
//SET_BIT_TO(axis_did_move, Z_HEAD, !!current_block->steps[C_AXIS]); //if (!!current_block->steps[B_AXIS]) SBI(axis_bits, Y_HEAD);
//if (!!current_block->steps[C_AXIS]) SBI(axis_bits, Z_HEAD);
axis_did_move = axis_bits;
// Initialize the trapezoid generator from the current block. // Initialize the trapezoid generator from the current block.
#if ENABLED(LIN_ADVANCE) #if ENABLED(LIN_ADVANCE)

Loading…
Cancel
Save