- Fixed various bugs in evcontroller relating to bad access after
initialization failure. - Fixed a bug in scan.c which causes scan to go in an endless loop when SICS failed to start a motor. - Fixed a bug in motor.c which caused bad softwarelimits after changes to the softzero. - Started changes in choco* in order incorporate normal parameters and an environment driver.
This commit is contained in:
44
choco.c
44
choco.c
@@ -111,18 +111,39 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
iRet = CHGetParameter(self,argv[1],pValue,79);
|
||||
if(iRet)
|
||||
if(argc > 2)
|
||||
{
|
||||
sprintf(pMessage,"%s.%s = %s",argv[0],argv[1],pValue);
|
||||
/* set case */
|
||||
iRet = self->pDriv->SetPar2(self->pDriv,argv[1],argv[2]);
|
||||
if(!iRet)
|
||||
{
|
||||
self->pDriv->GetError(self->pDriv,&iRet,pValue,79);
|
||||
sprintf(pMessage,"ERROR: %s",pValue);
|
||||
SCWrite(pCon,pMessage,eError);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(pMessage,"ERROR: %s : while reading parameter %s",
|
||||
/* get case */
|
||||
iRet = CHGetParameter(self,argv[1],pValue,79);
|
||||
if(iRet)
|
||||
{
|
||||
sprintf(pMessage,"%s.%s = %s",argv[0],argv[1],pValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(pMessage,"ERROR: %s : while reading parameter %s",
|
||||
pValue,argv[1]);
|
||||
}
|
||||
SCWrite(pCon,pMessage,eValue);
|
||||
return iRet;
|
||||
}
|
||||
SCWrite(pCon,pMessage,eValue);
|
||||
return iRet;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -166,7 +187,8 @@ extern pCodri MakeDoChoDriver(char *pHost, int iPort, int iChannel);
|
||||
|
||||
if(argc < 3)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: Insufficient number of arguments to MakeChopper",
|
||||
SCWrite(pCon,
|
||||
"ERROR: Insufficient number of arguments to MakeController",
|
||||
eError);
|
||||
return 0;
|
||||
}
|
||||
@@ -210,14 +232,14 @@ extern pCodri MakeDoChoDriver(char *pHost, int iPort, int iChannel);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: Driver %s NOT supported for MakeChopper",
|
||||
sprintf(pBueffel,"ERROR: Driver %s NOT supported for MakeController",
|
||||
argv[2]);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
return 0;
|
||||
}
|
||||
if( (pNew == NULL) || (pDes == NULL) || (pDriv == NULL) )
|
||||
{
|
||||
SCWrite(pCon,"ERROR: No memory left to create chopper",eError);
|
||||
SCWrite(pCon,"ERROR: No memory left to create controller",eError);
|
||||
return 0;
|
||||
}
|
||||
pNew->pDes = pDes;
|
||||
@@ -236,7 +258,7 @@ extern pCodri MakeDoChoDriver(char *pHost, int iPort, int iChannel);
|
||||
iRet = AddCommand(pSics, argv[1],ChocoAction,KillChoco,pNew);
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: duplicate SPS command %s NOT created",
|
||||
sprintf(pBueffel,"ERROR: duplicate command %s NOT created",
|
||||
argv[1]);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user