- introduced header file dependency check
- improvements in ease drivers - no "Counting finished" message in tas scan
This commit is contained in:
44
haakedriv.c
44
haakedriv.c
@ -80,23 +80,33 @@ int HaakeHandler(void *object)
|
||||
}
|
||||
goto quit;
|
||||
}
|
||||
l = strlen(eab->ans) - 1;
|
||||
if (l >= 0 && eab->ans[l] != '$') { /* end char is not $ -> send again */
|
||||
ParPrintf(eab, -2, "ans: %s", eab->ans);
|
||||
if (drv->errcnt < 10) {
|
||||
eab->state = EASE_read;
|
||||
EaseWrite(eab, NULL); /* send the same command again */
|
||||
drv->errcnt++;
|
||||
return 0;
|
||||
}
|
||||
eab->errCode = EASE_ILL_ANS;
|
||||
eab->state = EASE_idle;
|
||||
goto error;
|
||||
} else {
|
||||
drv->errcnt = 0;
|
||||
}
|
||||
if (iret == 1) {
|
||||
ParPrintf(eab, -2, "ans: %s", eab->ans);
|
||||
|
||||
if (eab->state == EASE_lost) {
|
||||
if (strcmp(eab->ans, "F001") == 0) {
|
||||
EaseWrite(eab, "V");
|
||||
}
|
||||
goto quit;
|
||||
}
|
||||
l = strlen(eab->ans) - 1;
|
||||
if (l >= 0 && eab->ans[l] != '$') {
|
||||
/* end char is not $ -> send again */
|
||||
ParPrintf(eab, -2, "ans: %s", eab->ans);
|
||||
if (drv->errcnt < 10) {
|
||||
eab->state = EASE_read;
|
||||
EaseWrite(eab, NULL); /* send the same command again */
|
||||
drv->errcnt++;
|
||||
return 0;
|
||||
}
|
||||
eab->errCode = EASE_ILL_ANS;
|
||||
eab->state = EASE_idle;
|
||||
goto error;
|
||||
} else {
|
||||
drv->errcnt = 0;
|
||||
}
|
||||
|
||||
|
||||
if (eab->state == EASE_lost) {
|
||||
goto quit;
|
||||
} else if (eab->cmd[0] == 'V') {
|
||||
@ -112,7 +122,7 @@ int HaakeHandler(void *object)
|
||||
eab->state = EASE_idle;
|
||||
goto quit;
|
||||
} else {
|
||||
eab->tmo = 120;
|
||||
/* eab->tmo = 20; no need to change the timeout ? */
|
||||
}
|
||||
}
|
||||
if (iret != 1) {
|
||||
@ -126,12 +136,10 @@ int HaakeHandler(void *object)
|
||||
eab->state = EASE_lost;
|
||||
}
|
||||
} else if (eab->state == EASE_lost) {
|
||||
/*
|
||||
if (time(NULL) > eab->cmdtime) {
|
||||
EaseWrite(eab, "check");
|
||||
eab->state = EASE_lost;
|
||||
}
|
||||
*/
|
||||
}
|
||||
goto quit;
|
||||
error:
|
||||
|
Reference in New Issue
Block a user