tclmot
r3813 | jgn | 2012-11-16 14:27:07 +1100 (Fri, 16 Nov 2012) | 1 line
This commit is contained in:

committed by
Douglas Clowes

parent
6b8ec1e2f3
commit
e9cb798ecc
21
motor.c
21
motor.c
@ -565,16 +565,6 @@ extern void KillPiPiezo(void *pData);
|
|||||||
*fVal = self->pDriver->fLower;
|
*fVal = self->pDriver->fLower;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pPar = ObParFind(self->ParArray,name);
|
|
||||||
if(pPar)
|
|
||||||
{
|
|
||||||
*fVal = pPar->fVal;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* can still be position */
|
|
||||||
if(strcmp(name,"position") == 0)
|
if(strcmp(name,"position") == 0)
|
||||||
{
|
{
|
||||||
*fVal = self->fPosition;
|
*fVal = self->fPosition;
|
||||||
@ -585,11 +575,13 @@ extern void KillPiPiezo(void *pData);
|
|||||||
*fVal = self->fTarget;
|
*fVal = self->fTarget;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
pPar = ObParFind(self->ParArray,name);
|
||||||
|
if(pPar)
|
||||||
{
|
{
|
||||||
/*
|
*fVal = pPar->fVal;
|
||||||
check for a driver parameter
|
return 1;
|
||||||
*/
|
} else {
|
||||||
if(self->pDriver->GetDriverPar != NULL)
|
if(self->pDriver->GetDriverPar != NULL)
|
||||||
{
|
{
|
||||||
return self->pDriver->GetDriverPar(self->pDriver,name,fVal);
|
return self->pDriver->GetDriverPar(self->pDriver,name,fVal);
|
||||||
@ -600,7 +592,6 @@ extern void KillPiPiezo(void *pData);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
int MotorSetPar(pMotor self, SConnection *pCon, char *name, float fVal)
|
int MotorSetPar(pMotor self, SConnection *pCon, char *name, float fVal)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user