Marlin/stepper.cpp
/**
 * Set the stepper positions directly in steps
 *
 * The input is based on the typical per-axis XYZ steps.
 * For CORE machines XYZ needs to be translated to ABC.
 *
 * This allows get_axis_position_mm to correctly
 * derive the current XYZ position later on.
 */
Set the stepper positions directly in steps
The input is based on the typical per-axis XYZ steps.
For CORE machines XYZ needs to be translated to ABC.

This allows get_axis_position_mm to correctly
derive the current XYZ position later on.
Set the stepper positions directly in steps The input is based on the typical per - axis XYZ steps . For CORE machines XYZ needs to be translated to ABC . This allows get_axis_position_mm to correctly derive the current XYZ position later on .
void Stepper::set_position(const long& x, const long& y, const long& z, const long& e) {
  CRITICAL_SECTION_START;
  #if ENABLED(COREXY)
    count_position[A_AXIS] = x + y;
    count_position[B_AXIS] = x - y;
    count_position[Z_AXIS] = z;
  #elif ENABLED(COREXZ)
    count_position[A_AXIS] = x + z;
    count_position[Y_AXIS] = y;
    count_position[C_AXIS] = x - z;
  #elif ENABLED(COREYZ)
    count_position[X_AXIS] = x;
    count_position[B_AXIS] = y + z;
    count_position[C_AXIS] = y - z;
  #else
    count_position[X_AXIS] = x;
    count_position[Y_AXIS] = y;
    count_position[Z_AXIS] = z;
  #endif
  count_position[E_AXIS] = e;
  CRITICAL_SECTION_END;
}
void Stepper :: set_position ( const long & x , const long & y , const long & z , const long & e ) { CRITICAL_SECTION_START ; #if ENABLED ( COREXY ) count_position [ A_AXIS ] = x + y ; count_position [ B_AXIS ] = x - y ; count_position [ Z_AXIS ] = z ; #elif ENABLED ( COREXZ ) count_position [ A_AXIS ] = x + z ; count_position [ Y_AXIS ] = y ; count_position [ C_AXIS ] = x - z ; #elif ENABLED ( COREYZ ) count_position [ X_AXIS ] = x ; count_position [ B_AXIS ] = y + z ; count_position [ C_AXIS ] = y - z ; #else count_position [ X_AXIS ] = x ; count_position [ Y_AXIS ] = y ; count_position [ Z_AXIS ] = z ; #endif count_position [ E_AXIS ] = e ; CRITICAL_SECTION_END ; }
Set the stepper positions directly in steps
 The input is based on the typical per-axis XYZ steps.
Set the stepper positions directly in steps The input is based on the typical per - axis XYZ steps .
// corexy positioning // these equations follow the form of the dA and dB equations on http://www.corexy.com/theory.html // corexz planning // coreyz planning // default non-h-bot planning