- First working version of counter driver for ECB

- Motor driver works for normal, control and encoder motors
This commit is contained in:
cvs
2003-01-29 07:42:18 +00:00
parent e4d4643123
commit b1fd8e77ac
9 changed files with 631 additions and 15 deletions

View File

@ -565,7 +565,7 @@
return COTERM;
}
/*-------------------------------------------------------------------------*/
static int EL737Set(struct __COUNTER *self, int iCode, int iCter,
static int EL737Set(struct __COUNTER *self, char *name, int iCter,
float fVal)
{
int iRet;
@ -576,7 +576,7 @@
pEL737 = (EL737st *)self->pData;
assert(pEL737);
if(iCode == PARTHRESHOLD)
if(strcmp(name,"threshold") == 0)
{
sprintf(pCommand,"DL %1.1d %f\r",iCter,fVal);
iRet = EL737_SendCmnd(&pEL737->pData,pCommand,pReply,79);
@ -615,7 +615,7 @@
}
}
/*-------------------------------------------------------------------------*/
static int EL737Get(struct __COUNTER *self, int iCode, int iCter,
static int EL737Get(struct __COUNTER *self, char *name, int iCter,
float *fVal)
{
int iRet;
@ -626,7 +626,7 @@
pEL737 = (EL737st *)self->pData;
assert(pEL737);
if(iCode == PARTHRESHOLD)
if(strcmp(name,"threshold") == 0)
{
sprintf(pCommand,"DL %1.1d\r",iCter);
iRet = EL737_SendCmnd(&pEL737->pData,pCommand,pReply,79);