Simulated motors return unknown for units parameter.

r1719 | ffr | 2007-03-26 07:38:52 +1000 (Mon, 26 Mar 2007) | 2 lines
This commit is contained in:
Ferdi Franceschini
2007-03-26 07:38:52 +10:00
committed by Douglas Clowes
parent 5d593ff615
commit 5f0120ea5f
2 changed files with 7 additions and 0 deletions

View File

@ -63,6 +63,8 @@
void (*ListDriverPar)(void *self, char *motorName,
SConnection *pCon);
void (*KillPrivate)(void *self);
int (*GetDriverTextPar)(void *self, char *name,
char *textPar);
/* Simulation specific fields */
float fFailure; /* percent random failures*/

View File

@ -258,6 +258,10 @@ static int SimSetPar(void *self, SConnection *pCon, char *name, float newValue)
}
return 0;
}
static int SimGetTextPar(void *pData, char *name, char *textPar) {
snprintf(textPar, 8, "unknown");
return 1;
}
/*---------------------------------------------------------------------------*/
void KillSIM(void *pData)
{
@ -366,6 +370,7 @@ static int SimSetPar(void *self, SConnection *pCon, char *name, float newValue)
pDriv->fSpeed = .01;
pDriv->iTime = 0;
pDriv->KillPrivate = KillSIM;
pDriv->GetDriverTextPar = SimGetTextPar;
/* check for optional speed paramter */
pCurrent = pCurrent->pNext;