From 129573b401ce6dde3bf93039cbd5a4cf06307836 Mon Sep 17 00:00:00 2001 From: Davide Marcato Date: Wed, 11 Sep 2019 18:03:55 +0200 Subject: [PATCH] Fixing first homing in wrong direction --- beckMotorApp/BeckhoffSrc/BeckController.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/beckMotorApp/BeckhoffSrc/BeckController.cpp b/beckMotorApp/BeckhoffSrc/BeckController.cpp index e66613c..2db0ed2 100644 --- a/beckMotorApp/BeckhoffSrc/BeckController.cpp +++ b/beckMotorApp/BeckhoffSrc/BeckController.cpp @@ -573,11 +573,11 @@ BeckAxis::BeckAxis(BeckController *pC, int axis) : movePend=false; limitSwitchDownIsInputOne = 0; //to invert the limit switches, based on how they are cabled encoderEnabled = false; - curr_min_velo = 0; - curr_max_velo = 0; - curr_home_velo = 0; - curr_acc = 0; - curr_forw = 0; + curr_min_velo = 0; //mSteps + curr_max_velo = 0; //mSteps + curr_home_velo = 0; //mSteps + curr_acc = 0; //mSteps + curr_forw = -1; // illegal value to trigger first writing in any case startingHome = false; exitingLimSw = false; microstepPerStep = 64;