diff --git a/motor.c b/motor.c index e427f41e..aeaacf70 100644 --- a/motor.c +++ b/motor.c @@ -1195,9 +1195,10 @@ extern MotorDriver *MakePiPiezo(Tcl_Interp *pTcl, char *pArray); TokenList *pList = NULL; TokenList *pCurrent; TokenList *pName; - int iRet; + int iRet, iRet2=0; pMotor self; float fValue; + char textValue[TEXTPARLEN]; long lID; pMotInfo pMoti = NULL; @@ -1352,7 +1353,10 @@ extern MotorDriver *MakePiPiezo(Tcl_Interp *pTcl, char *pArray); return 1; } 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); SCWrite(pCon,pBueffel,eValue); @@ -1361,7 +1365,10 @@ extern MotorDriver *MakePiPiezo(Tcl_Interp *pTcl, char *pArray); } else { - sprintf(pBueffel, "%s.%s = %f",self->name,pName->text,fValue); + 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); SCWrite(pCon,pBueffel,eValue); DeleteTokenList(pList); return 1;