- improvements in protocols and drivers

This commit is contained in:
zolliker
2012-06-19 07:19:03 +00:00
parent 6c69b59fce
commit 86d225a714
13 changed files with 243 additions and 95 deletions

View File

@ -731,7 +731,8 @@ static long ItcStart(long pc, void *object)
{
Itc *drv = ParCast(&itcClass, object);
EaseBase *eab = object;
char msg[256];
switch (pc) {
default: /* FSM BEGIN ****************************** */
EasePchk(drv);
@ -740,10 +741,9 @@ static long ItcStart(long pc, void *object)
case __LINE__: /**********************************/
if (eab->syntax == TESLATRON) {
if (0 != strncmp(eab->version, "TESLATRON", 9)) {
snprintf(eab->msg, sizeof eab->msg,
snprintf(msg, sizeof msg,
"unknown teslatron version: %s", eab->version);
ParPrintf(drv, eError, "ERROR: %s", eab->msg);
EaseStop(eab);
EaseStop(eab, msg);
goto quit;
}
} else {
@ -752,11 +752,10 @@ static long ItcStart(long pc, void *object)
} else if (0 == strncmp(eab->version, "ITC4", 4)) {
eab->syntax = 0;
} else {
snprintf(eab->msg, sizeof eab->msg,
snprintf(msg, sizeof msg,
"unknown temperature controller version: %s",
eab->version);
ParPrintf(drv, eError, "ERROR: %s", eab->msg);
EaseStop(eab);
EaseStop(eab, msg);
goto quit;
}
}