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:

committed by
Douglas Clowes

parent
5d593ff615
commit
5f0120ea5f
2
modriv.h
2
modriv.h
@ -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*/
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user