Merge pull request #94 from shadowguy/master

Added I/O flush before first query (Micronix MMC-x00)
This commit is contained in:
Kevin Peterson
2018-04-27 10:34:19 -05:00
committed by GitHub
+3
View File
@@ -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();