From d2548994461729c209e02bae8a87502d7bb3529e Mon Sep 17 00:00:00 2001 From: Scott Stubbs Date: Mon, 9 Apr 2018 01:33:44 -0700 Subject: [PATCH] Added I/O flush before first query --- motorApp/MicronixSrc/MMC200Driver.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/motorApp/MicronixSrc/MMC200Driver.cpp b/motorApp/MicronixSrc/MMC200Driver.cpp index d91a5f39..00bd3176 100644 --- a/motorApp/MicronixSrc/MMC200Driver.cpp +++ b/motorApp/MicronixSrc/MMC200Driver.cpp @@ -136,6 +136,9 @@ MMC200Axis::MMC200Axis(MMC200Controller *pC, int axisNo) // controller axes are numbered from 1 axisIndex_ = axisNo + 1; + // Flush I/O in case there is lingering garbage + pC_->writeReadController(); + // Read the version string to determine controller model (200/100) sprintf(pC_->outString_, "%dVER?", axisIndex_); status = pC_->writeReadController();