Matthew Pearson's (Diamond) fix for;

- idle polling interfering with setting position.
- auto save/restore not working.
This commit is contained in:
Ron Sluiter
2009-02-05 16:01:51 +00:00
parent 1d67e60ab0
commit e4a8aa0060
+11 -1
View File
@@ -495,6 +495,8 @@ static int motorAxisSetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double
if (pAxis == NULL) return MOTOR_AXIS_ERROR;
else
{
if (epicsMutexLock( pAxis->mutexId ) == epicsMutexLockOK)
{
switch (function)
{
case motorAxisPosition:
@@ -708,8 +710,16 @@ static int motorAxisSetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double
PRINT(pAxis->logParam, ERROR, "motorAxisSetDouble[%d,%d]: unknown function %d\n", pAxis->card, pAxis->axis, function);
break;
}
if (status == MOTOR_AXIS_OK )
{
motorParam->setDouble( pAxis->params, function, value );
motorParam->callCallback( pAxis->params );
}
epicsMutexUnlock( pAxis->mutexId );
}
}
if (ret_status != MOTOR_AXIS_ERROR) status = motorParam->setDouble(pAxis->params, function, value);
return ret_status;
}