forked from epics_driver_modules/motorBase
Merge pull request #83 from mp49/autopower_fix
Fix issue with power being left on when using autoPower option in asy…
This commit is contained in:
@@ -280,6 +280,7 @@ asynStatus asynMotorController::writeFloat64(asynUser *pasynUser, epicsFloat64 v
|
||||
if (function == motorMoveRel_) {
|
||||
if (autoPower == 1) {
|
||||
status = pAxis->setClosedLoop(true);
|
||||
pAxis->setWasMovingFlag(1);
|
||||
epicsThreadSleep(autoPowerOnDelay);
|
||||
}
|
||||
getDoubleParam(axis, motorVelBase_, &baseVelocity);
|
||||
@@ -296,6 +297,7 @@ asynStatus asynMotorController::writeFloat64(asynUser *pasynUser, epicsFloat64 v
|
||||
} else if (function == motorMoveAbs_) {
|
||||
if (autoPower == 1) {
|
||||
status = pAxis->setClosedLoop(true);
|
||||
pAxis->setWasMovingFlag(1);
|
||||
epicsThreadSleep(autoPowerOnDelay);
|
||||
}
|
||||
getDoubleParam(axis, motorVelBase_, &baseVelocity);
|
||||
@@ -312,6 +314,7 @@ asynStatus asynMotorController::writeFloat64(asynUser *pasynUser, epicsFloat64 v
|
||||
} else if (function == motorMoveVel_) {
|
||||
if (autoPower == 1) {
|
||||
status = pAxis->setClosedLoop(true);
|
||||
pAxis->setWasMovingFlag(1);
|
||||
epicsThreadSleep(autoPowerOnDelay);
|
||||
}
|
||||
getDoubleParam(axis, motorVelBase_, &baseVelocity);
|
||||
@@ -328,6 +331,7 @@ asynStatus asynMotorController::writeFloat64(asynUser *pasynUser, epicsFloat64 v
|
||||
} else if (function == motorHome_) {
|
||||
if (autoPower == 1) {
|
||||
status = pAxis->setClosedLoop(true);
|
||||
pAxis->setWasMovingFlag(1);
|
||||
epicsThreadSleep(autoPowerOnDelay);
|
||||
}
|
||||
getDoubleParam(axis, motorVelBase_, &baseVelocity);
|
||||
|
||||
Reference in New Issue
Block a user