mirror of
https://github.com/Binary-Coalescence/motorDSM.git
synced 2025-08-04 21:55:40 -05:00
Added gain checking to the poll method.
This commit is contained in:
@@ -367,6 +367,14 @@ asynStatus MD90Axis::poll(bool *moving)
|
|||||||
sscanf (pC_->inString_, "%d: %[^:]: %lf", &replyStatus, replyString, &position);
|
sscanf (pC_->inString_, "%d: %[^:]: %lf", &replyStatus, replyString, &position);
|
||||||
setDoubleParam(pC_->motorPosition_, position);
|
setDoubleParam(pC_->motorPosition_, position);
|
||||||
|
|
||||||
|
// Read the current motor integral gain (range 1-1000)
|
||||||
|
sprintf(pC_->outString_, "GGN");
|
||||||
|
comStatus = pC_->writeReadController();
|
||||||
|
if (comStatus) goto skip;
|
||||||
|
// The response string is of the form "0: Gain: 1000"
|
||||||
|
sscanf (pC_->inString_, "%d: %[^:]: %d", &replyStatus, replyString, &replyValue);
|
||||||
|
setDoubleParam(pC_->motorIGain_, replyValue);
|
||||||
|
|
||||||
skip:
|
skip:
|
||||||
setIntegerParam(pC_->motorStatusProblem_, comStatus ? 1:0);
|
setIntegerParam(pC_->motorStatusProblem_, comStatus ? 1:0);
|
||||||
callParamCallbacks();
|
callParamCallbacks();
|
||||||
|
Reference in New Issue
Block a user