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