- Fixed a confusing error message with the SANS-2 velocity selector

- Added a parameter DEC to the motor driver which determines the
  number of decimals on the fucking display screen and made this work too
This commit is contained in:
koennecke
2005-04-22 14:10:04 +00:00
parent 123d4bf980
commit a14e06dd91
2 changed files with 15 additions and 1 deletions

View File

@@ -70,6 +70,12 @@ typedef struct __VelSelDriv *pVelSelDriv;
has yet been read. Solves a starting
problem
*/
int firstStatus; /* at times the nvs does not send
the reply to the first status
request after starting. This flag
helps to suppress an error message
which may be confusing to loosers
*/
} Dornier, *pDornier;
/*------------------------------------------------------------------*/
static int requestDornierStatus(pDornier pDorn){
@@ -271,6 +277,7 @@ static int takeControl(pDornier pDorn){
iRet = transactRS232(pDorn->controller,pCommand,strlen(pCommand),
pAnswer,49);
setRS232ReplyTerminator(pDorn->controller,"\n");
pDorn->firstStatus = 1;
if(iRet != 1)
{
if(iRet != INCOMPLETE){
@@ -389,6 +396,10 @@ static int evaluateStatus(pVelSelDriv self, int *iCode){
pDorn->statusMode = STATSEND;
status = readAndInterpretStatus(pDorn,&sStatus);
if(!status){
if(pDorn->firstStatus == 1){
pDorn->firstStatus = 0;
return VSACCEL;
}
return VELOFAIL;
}