- Added support for accessing the exe file management functions from scripts

- Fixed a bug in hmdata.c
- Fixed an issue with tempoerature writing through RemObjects in mesure
- Added auxiliary reflections to tasub
- Make maximize use soft motor positions
This commit is contained in:
koennecke
2006-11-24 15:51:19 +00:00
parent f15cb4c6db
commit 0825c48986
24 changed files with 328 additions and 253 deletions

View File

@ -434,6 +434,42 @@ void getRS232Error(int iCode, char *errorBuffer,
}
}
/*--------------------------------------------------------------------*/
int fixRS232Error(prs232 self, int iCode){
int i, status, read;
char buffer[8192];
switch(iCode){
case BADMEMORY:
case FAILEDCONNECT:
return 0;
break;
case INCOMPLETE:
case TIMEOUT:
/*
* try to clear possibly pending stuff
*/
for(i = 0; i < 3; i++){
if(availableRS232(self)){
read = 8192;
readRS232(self,buffer,&read);
}
}
return 1;
break;
case NOTCONNECTED:
case BADSEND:
closeRS232(self);
status = initRS232(self);
if(status){
return 1;
} else {
return 0;
}
break;
}
return 0;
}
/*--------------------------------------------------------------------*/
int getRS232Timeout(prs232 self){
return self->timeout;
}