mirror of
https://github.com/Binary-Coalescence/motorDSM.git
synced 2025-08-04 21:55:40 -05:00
Updated to read md90 power state.
This commit is contained in:
@@ -299,10 +299,12 @@ asynStatus MD90Axis::poll(bool *moving)
|
|||||||
setIntegerParam(pC_->motorStatusAtHome_, home);
|
setIntegerParam(pC_->motorStatusAtHome_, home);
|
||||||
|
|
||||||
// Read the drive power on status
|
// Read the drive power on status
|
||||||
sprintf(pC_->outString_, "#%02dW", axisNo_);
|
sprintf(pC_->outString_, "GPS");
|
||||||
comStatus = pC_->writeReadController();
|
comStatus = pC_->writeReadController();
|
||||||
if (comStatus) goto skip;
|
if (comStatus) goto skip;
|
||||||
driveOn = (pC_->inString_[5] == '1') ? 1:0;
|
// The response string is of the form "0: Power supply enabled state: 1"
|
||||||
|
sscanf (pC_->inString_, "%d: %[^:]: %d", &replyStatus, replyString, &replyValue);
|
||||||
|
driveOn = (replyValue == '1') ? 1:0;
|
||||||
setIntegerParam(pC_->motorStatusPowerOn_, driveOn);
|
setIntegerParam(pC_->motorStatusPowerOn_, driveOn);
|
||||||
setIntegerParam(pC_->motorStatusProblem_, 0);
|
setIntegerParam(pC_->motorStatusProblem_, 0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user