commit
2464b7a3f0
|
@ -16,11 +16,11 @@ void StepperControl::reportEncoders()
|
|||
{
|
||||
Serial.print(COMM_REPORT_ENCODER_SCALED);
|
||||
Serial.print(" X");
|
||||
Serial.print(encoderX.currentPosition());
|
||||
Serial.print((float)encoderX.currentPosition() / (float)stepsPerMm[0]);
|
||||
Serial.print(" Y");
|
||||
Serial.print(encoderY.currentPosition());
|
||||
Serial.print((float)encoderY.currentPosition() / (float)stepsPerMm[1]);
|
||||
Serial.print(" Z");
|
||||
Serial.print(encoderZ.currentPosition());
|
||||
Serial.print((float)encoderZ.currentPosition() / (float)stepsPerMm[2]);
|
||||
CurrentState::getInstance()->printQAndNewLine();
|
||||
|
||||
Serial.print(COMM_REPORT_ENCODER_RAW);
|
||||
|
@ -1388,32 +1388,32 @@ bool StepperControl::endStopsReached()
|
|||
void StepperControl::storePosition()
|
||||
{
|
||||
|
||||
// if (motorConsEncoderEnabled[0])
|
||||
// {
|
||||
// CurrentState::getInstance()->setX(encoderX.currentPosition());
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
if (motorConsEncoderEnabled[0])
|
||||
{
|
||||
CurrentState::getInstance()->setX(encoderX.currentPosition());
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentState::getInstance()->setX(axisX.currentPosition());
|
||||
// }
|
||||
}
|
||||
|
||||
// if (motorConsEncoderEnabled[1])
|
||||
// {
|
||||
// CurrentState::getInstance()->setY(encoderY.currentPosition());
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
if (motorConsEncoderEnabled[1])
|
||||
{
|
||||
CurrentState::getInstance()->setY(encoderY.currentPosition());
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentState::getInstance()->setY(axisY.currentPosition());
|
||||
// }
|
||||
}
|
||||
|
||||
// if (motorConsEncoderEnabled[2])
|
||||
// {
|
||||
// CurrentState::getInstance()->setZ(encoderZ.currentPosition());
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
if (motorConsEncoderEnabled[2])
|
||||
{
|
||||
CurrentState::getInstance()->setZ(encoderZ.currentPosition());
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentState::getInstance()->setZ(axisZ.currentPosition());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
void StepperControl::reportEndStops()
|
||||
|
|
Loading…
Reference in New Issue