PSI sics-cvs-psi-complete-tree-post-site-support
This commit is contained in:
28
velo.c
28
velo.c
@@ -54,6 +54,7 @@
|
||||
#include "velo.h"
|
||||
#include "velo.i"
|
||||
#include "velodriv.h"
|
||||
#include "site.h"
|
||||
|
||||
/* -------- defines for parameters to velocity selector */
|
||||
#define INT 0
|
||||
@@ -172,7 +173,8 @@
|
||||
/* if we are here we tried three times and failed to get it
|
||||
work
|
||||
*/
|
||||
sprintf(pBueffel,"ERRROR: Failed 3 times to vary rotation speed. Failing.");
|
||||
sprintf(pBueffel,
|
||||
"ERRROR: Failed 3 times to vary rotation speed. Failing.");
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
SCSetInterrupt(pCon,(int)ObVal(self->pPar,INT));
|
||||
EVCSetMode(self->pMonitor,EVIdle);
|
||||
@@ -192,7 +194,11 @@
|
||||
|
||||
iRet = self->pDriv->GetStatus(self->pDriv,&iSig,&fVal);
|
||||
InvokeCallBack(self->pCall,iSig,&fVal);
|
||||
switch(iRet)
|
||||
if(SCGetInterrupt(pCon) != eContinue)
|
||||
{
|
||||
return HWFault;
|
||||
}
|
||||
switch(iRet)
|
||||
{
|
||||
case VSACCEL:
|
||||
return HWBusy;
|
||||
@@ -746,7 +752,8 @@
|
||||
Tcl_Interp *pT = NULL;
|
||||
int iRet;
|
||||
pEVDriver pMonDriv = NULL;
|
||||
|
||||
pSite site = NULL;
|
||||
|
||||
assert(pCon);
|
||||
assert(pSics);
|
||||
|
||||
@@ -777,16 +784,21 @@
|
||||
{
|
||||
pDriv = VSCreateSim();
|
||||
}
|
||||
else if(strcmp(argv[3],"dornier") == 0) /* Dornier velocity selector */
|
||||
else
|
||||
{
|
||||
if(argc < 5)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: missing options array for Dornier velocity selector");
|
||||
sprintf(pBueffel,
|
||||
"ERROR: missing options array for velocity selector");
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
return 0;
|
||||
}
|
||||
pT = (Tcl_Interp *)pSics->pTcl;
|
||||
pDriv = VSCreateDornierSINQ(argv[4],pT);
|
||||
pT = InterpGetTcl(pSics);
|
||||
site = getSite();
|
||||
if(site != NULL)
|
||||
{
|
||||
pDriv = site->CreateVelocitySelector(argv[3],argv[4],pT);
|
||||
}
|
||||
if(!pDriv)
|
||||
{
|
||||
SCWrite(pCon,pT->result,eError);
|
||||
@@ -802,7 +814,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* now initialise the rubbish and install it as command */
|
||||
/* now initialise this and install it as command */
|
||||
pNew = VSCreate(pTilt,pDriv);
|
||||
if(!pNew)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user