forked from epics_driver_modules/motorBase
Matthew Pearson's (Diamond) "set position" fix.
This commit is contained in:
@@ -3,9 +3,9 @@ FILENAME... drvANC150Asyn.cc
|
||||
USAGE... asyn motor driver support for attocube systems AG ANC150
|
||||
Piezo Step Controller.
|
||||
|
||||
Version: $Revision: 1.6 $
|
||||
Version: $Revision: 1.7 $
|
||||
Modified By: $Author: sluiter $
|
||||
Last Modified: $Date: 2008-11-24 22:25:32 $
|
||||
Last Modified: $Date: 2009-02-18 21:39:00 $
|
||||
|
||||
*/
|
||||
|
||||
@@ -45,6 +45,10 @@ Last Modified: $Date: 2008-11-24 22:25:32 $
|
||||
* - support enable/disable "torque".
|
||||
* - zero move bug fix.
|
||||
* - set firmwareVersion.
|
||||
* .04 02-18-09 rls Copied Matthew Pearson's (Diamond) fix on XPS for;
|
||||
* - idle polling interfering with setting position.
|
||||
* - auto save/restore not working.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -297,6 +301,7 @@ static int motorAxisSetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double
|
||||
return(MOTOR_AXIS_ERROR);
|
||||
else
|
||||
{
|
||||
epicsMutexLock(pAxis->mutexId);
|
||||
switch (function)
|
||||
{
|
||||
case motorAxisPosition:
|
||||
@@ -342,9 +347,13 @@ static int motorAxisSetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double
|
||||
"motorAxisSetDouble: unknown function %d\n", function);
|
||||
break;
|
||||
}
|
||||
if (ret_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);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
FILENAME... drvMotorSim.c
|
||||
USAGE... Simulated Motor Support.
|
||||
|
||||
Version: $Revision: 1.8 $
|
||||
Modified By: $Author: mp49 $
|
||||
Last Modified: $Date: 2008-11-28 17:36:59 $
|
||||
Version: $Revision: 1.9 $
|
||||
Modified By: $Author: sluiter $
|
||||
Last Modified: $Date: 2009-02-18 21:39:40 $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -12,7 +12,8 @@ Last Modified: $Date: 2008-11-28 17:36:59 $
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* 20060506 npr Added prolog
|
||||
* 2006-05-06 npr Added prolog
|
||||
* 2009-02-11 rls lock/unlock motorAxisSetDouble().
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
@@ -226,6 +227,7 @@ static int motorAxisSetDouble( AXIS_HDL pAxis, motorAxisParam_t function, double
|
||||
if (pAxis == NULL) return MOTOR_AXIS_ERROR;
|
||||
else
|
||||
{
|
||||
epicsMutexLock(pAxis->axisMutex);
|
||||
switch (function)
|
||||
{
|
||||
case motorAxisPosition:
|
||||
@@ -278,8 +280,12 @@ static int motorAxisSetDouble( AXIS_HDL pAxis, motorAxisParam_t function, double
|
||||
status = MOTOR_AXIS_ERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
if (status != MOTOR_AXIS_ERROR ) status = motorParam->setDouble( pAxis->params, function, value );
|
||||
if (status == MOTOR_AXIS_OK )
|
||||
{
|
||||
motorParam->setDouble(pAxis->params, function, value);
|
||||
motorParam->callCallback(pAxis->params);
|
||||
}
|
||||
epicsMutexUnlock(pAxis->axisMutex);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user