diff --git a/dsmApp/src/MD90Driver.cpp b/dsmApp/src/MD90Driver.cpp index e257d93..08ea0c5 100644 --- a/dsmApp/src/MD90Driver.cpp +++ b/dsmApp/src/MD90Driver.cpp @@ -253,6 +253,9 @@ asynStatus MD90Axis::home(double minVelocity, double maxVelocity, double acceler if (!status) { // Wait for the move to complete, then home sleepTime = SLEEP_MARGIN * SMALL_NSTEPS * COUNTS_PER_STEP / maxVelocity; + if (sleepTime < HOME_SLEEP_MIN) { + sleepTime = HOME_SLEEP_MIN; + } std::this_thread::sleep_for(std::chrono::seconds(sleepTime)); sprintf(pC_->outString_, "HOM"); diff --git a/dsmApp/src/MD90Driver.h b/dsmApp/src/MD90Driver.h index 6fb992a..975513b 100644 --- a/dsmApp/src/MD90Driver.h +++ b/dsmApp/src/MD90Driver.h @@ -13,6 +13,7 @@ USAGE... Motor driver support for the DSM MD-90 controller. #define NUM_MD90_PARAMS 0 #define SLEEP_MARGIN 1.2 // Extra factor to wait after stepping before homing +#define HOME_SLEEP_MIN 1 // Minimum amount of time to wait after stepping/before homing #define SMALL_NSTEPS 5 // Number of steps to take to set direction for homing routine #define COUNTS_PER_STEP 1000.0 // Number of encoder counts per motor step (measured by testing)