Reverted support for text value parameters.

This has been made obsolete by the pActionRoutine.

r1954 | ffr | 2007-05-10 16:09:04 +1000 (Thu, 10 May 2007) | 3 lines
This commit is contained in:
Ferdi Franceschini
2007-05-10 16:09:04 +10:00
committed by Douglas Clowes
parent 5b683ecbe0
commit 691ea5dbf0

13
motor.c
View File

@@ -1199,10 +1199,9 @@ extern MotorDriver *MakePiPiezo(Tcl_Interp *pTcl, char *pArray);
TokenList *pList = NULL;
TokenList *pCurrent;
TokenList *pName;
int iRet, iRet2=0;
int iRet;
pMotor self;
float fValue;
char textValue[TEXTPARLEN];
long lID;
pMotInfo pMoti = NULL;
@@ -1357,10 +1356,7 @@ extern MotorDriver *MakePiPiezo(Tcl_Interp *pTcl, char *pArray);
return 1;
}
iRet = MotorGetPar(self,pName->text,&fValue);
if(self->pDriver->GetDriverTextPar != NULL)
iRet2 = self->pDriver->GetDriverTextPar(self->pDriver, pName->text, textValue);
if(!(iRet || iRet2))
if(!iRet)
{
sprintf(pBueffel,"Parameter %s not found ",pName->text);
SCWrite(pCon,pBueffel,eValue);
@@ -1369,10 +1365,7 @@ extern MotorDriver *MakePiPiezo(Tcl_Interp *pTcl, char *pArray);
}
else
{
if (iRet)
sprintf(pBueffel, "%s.%s = %f",self->name,pName->text,fValue);
else if (iRet2)
sprintf(pBueffel, "%s.%s = %s",self->name,pName->text,textValue);
sprintf(pBueffel, "%s.%s = %f",self->name,pName->text,fValue);
SCWrite(pCon,pBueffel,eValue);
DeleteTokenList(pList);
return 1;