- Added triple axis scan command.
- Introduced simulation mode to simdriv and simcter, i.e they never fail and finish at once. - Started defining MAD compatibility commands in Tcl - Fixed a bug in FOCUS_src which caused it to leak sockets. - Introduced setsockopt SO_REUSEADDR to all new sockets in sinqhm in order to loose the next sinqhm error.
This commit is contained in:
28
simdriv.c
28
simdriv.c
@ -73,6 +73,15 @@
|
||||
assert(self);
|
||||
pDriv = (SIMDriv *)self;
|
||||
|
||||
/*
|
||||
no error checking case
|
||||
*/
|
||||
if(pDriv->fFailure < .0)
|
||||
{
|
||||
*fPos = pDriv->fPos;
|
||||
return OKOK;
|
||||
}
|
||||
|
||||
if(SimRandom() < pDriv->fFailure)
|
||||
{
|
||||
*fPos = SimRandom();
|
||||
@ -100,6 +109,16 @@
|
||||
assert(self);
|
||||
pDriv = (SIMDriv *)self;
|
||||
|
||||
/*
|
||||
no failure, no wait situation
|
||||
*/
|
||||
if(pDriv->fFailure < .0)
|
||||
{
|
||||
pDriv->fPos = fVal;
|
||||
return OKOK;
|
||||
}
|
||||
|
||||
|
||||
/* calculate time for completion */
|
||||
fDiff = fVal - pDriv->fPos;
|
||||
if(fDiff < .0) fDiff = -fDiff;
|
||||
@ -187,6 +206,15 @@
|
||||
|
||||
assert(self);
|
||||
pDriv = (SIMDriv *)self;
|
||||
|
||||
/*
|
||||
no wait, no fail situation
|
||||
*/
|
||||
if(pDriv->fFailure < .0)
|
||||
{
|
||||
return HWIdle;
|
||||
}
|
||||
|
||||
if(RunComplete(pDriv))
|
||||
{
|
||||
return HWIdle;
|
||||
|
Reference in New Issue
Block a user