- Added Sycamore protocol and command context to SICS
- Added sinfo to SICS - Added driver for TCP/IP Astrium velocity selector - Added driver for TCP/IP Astrium chopper controller
This commit is contained in:
45
el734hp.c
45
el734hp.c
@ -392,6 +392,27 @@ static void EL734Error(void *pData, int *iCode, char *error, int errLen){
|
||||
}
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
static int EL734Halt(void *pData){
|
||||
pEL734Driv self = NULL;
|
||||
int status;
|
||||
char pCommand[50],pReply[80];
|
||||
|
||||
self = (pEL734Driv)pData;
|
||||
assert(self);
|
||||
|
||||
snprintf(pCommand,79,"s %d\r",self->iMotor);
|
||||
status = transactEL734(self->controller,pCommand,strlen(pCommand),
|
||||
pReply,79);
|
||||
if(status != 1){
|
||||
self->errorCode = status;
|
||||
return 0;
|
||||
}
|
||||
if(!checkResponse(self,pReply)){
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
static int EL734Fix(void *pData, int iCode, float fValue){
|
||||
pEL734Driv self = NULL;
|
||||
int status, msr, i, len = 49;
|
||||
@ -404,7 +425,10 @@ static int EL734Fix(void *pData, int iCode, float fValue){
|
||||
case BADADR:
|
||||
case BADCMD:
|
||||
case BADPAR:
|
||||
return MOTREDO;
|
||||
case BADBSY:
|
||||
EL734Halt(pData);
|
||||
SicsWait(1);
|
||||
return MOTREDO;
|
||||
case TIMEOUT:
|
||||
for(i = 0; i < 3; i++){
|
||||
@ -466,27 +490,6 @@ static int EL734Fix(void *pData, int iCode, float fValue){
|
||||
}
|
||||
return MOTFAIL;
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
static int EL734Halt(void *pData){
|
||||
pEL734Driv self = NULL;
|
||||
int status;
|
||||
char pCommand[50],pReply[80];
|
||||
|
||||
self = (pEL734Driv)pData;
|
||||
assert(self);
|
||||
|
||||
snprintf(pCommand,79,"s %d\r",self->iMotor);
|
||||
status = transactEL734(self->controller,pCommand,strlen(pCommand),
|
||||
pReply,79);
|
||||
if(status != 1){
|
||||
self->errorCode = status;
|
||||
return 0;
|
||||
}
|
||||
if(!checkResponse(self,pReply)){
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*--------------------------------------------------------------------*/
|
||||
static int EL734GetPar(void *pData, char *name,
|
||||
float *fValue){
|
||||
|
Reference in New Issue
Block a user