Merge pull request #139 from TimEvWw/master

Adding debug print out
master
Tim Evers 2020-03-26 23:35:51 +01:00 committed by GitHub
commit 3ed9d033eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 4 deletions

View File

@ -32,7 +32,7 @@ int F11Handler::execute(Command *command)
}
int homeIsUp = ParameterList::getInstance()->getValue(MOVEMENT_HOME_UP_X);
int A = 10 * CurrentState::getInstance()->getStepsPerMmX(); // move away coordinates
int A = 10; // move away coordinates
int execution;
bool emergencyStop;
@ -71,6 +71,21 @@ int F11Handler::execute(Command *command)
emergencyStop = CurrentState::getInstance()->isEmergencyStop();
if (emergencyStop || execution != 0) { break; }
Serial.print("R99 homing displaced");
Serial.print(" X ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsX());
Serial.print(" / ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsXscaled());
Serial.print(" Y ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsY());
Serial.print(" / ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsYscaled());
Serial.print(" Z ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsZ());
Serial.print(" / ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsZscaled());
Serial.print("\r\n");
// Home position cannot drift more than 5 milimeter otherwise no valid home pos
if (CurrentState::getInstance()->getHomeMissedStepsXscaled() < 5)
{

View File

@ -32,7 +32,7 @@ int F12Handler::execute(Command *command)
}
int homeIsUp = ParameterList::getInstance()->getValue(MOVEMENT_HOME_UP_Y);
int A = 10 * CurrentState::getInstance()->getStepsPerMmY(); // move away coordinates
int A = 10; // move away coordinates
int execution;
bool emergencyStop;
bool homingComplete = false;
@ -72,6 +72,21 @@ int F12Handler::execute(Command *command)
emergencyStop = CurrentState::getInstance()->isEmergencyStop();
if (emergencyStop || execution != 0) { break; }
Serial.print("R99 homing displaced");
Serial.print(" X ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsX());
Serial.print(" / ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsXscaled());
Serial.print(" Y ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsY());
Serial.print(" / ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsYscaled());
Serial.print(" Z ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsZ());
Serial.print(" / ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsZscaled());
Serial.print("\r\n");
// Compare postition before and after verify homing
if (CurrentState::getInstance()->getHomeMissedStepsYscaled() < 5)
{

View File

@ -34,7 +34,7 @@ int F13Handler::execute(Command *command)
Movement::getInstance()->moveToCoords(0, 0, 0, 0, 0, 0, false, false, true);
int homeIsUp = ParameterList::getInstance()->getValue(MOVEMENT_HOME_UP_Z);
int A = 10 * CurrentState::getInstance()->getStepsPerMmZ(); // move away coordinates
int A = 10; // move away coordinates
int execution;
bool emergencyStop;
@ -73,6 +73,21 @@ int F13Handler::execute(Command *command)
emergencyStop = CurrentState::getInstance()->isEmergencyStop();
if (emergencyStop || execution != 0) { break; }
Serial.print("R99 homing displaced");
Serial.print(" X ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsX());
Serial.print(" / ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsXscaled());
Serial.print(" Y ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsY());
Serial.print(" / ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsYscaled());
Serial.print(" Z ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsZ());
Serial.print(" / ");
Serial.print(CurrentState::getInstance()->getHomeMissedStepsZscaled());
Serial.print("\r\n");
// Compare postition before and after verify homing
if (CurrentState::getInstance()->getHomeMissedStepsZscaled() < 5)
{

View File

@ -428,7 +428,6 @@ int Movement::moveToCoords(double xDestScaled, double yDestScaled, double zDestS
long homeMissedSteps[3] = { 0, 0, 0 };
motorConsMissedSteps[0] = 0;
motorConsMissedSteps[1] = 0;
motorConsMissedSteps[2] = 0;