SICS-545 Fixed lockup/hang/freeze of Dingo cameradriver. The
cameradriver would stop sending commands after about one minute if the safety_plc (ie SIS) driver was also running.
This commit is contained in:
@@ -729,16 +729,6 @@ static int cb_getstate(pAsyncTxn txn) {
|
|||||||
cm_sym = camera_model(ca_sym);
|
cm_sym = camera_model(ca_sym);
|
||||||
run_sm(self, cm_sym);
|
run_sm(self, cm_sym);
|
||||||
}
|
}
|
||||||
if (self->state_timer) {
|
|
||||||
NetWatchRemoveTimer(self->state_timer);
|
|
||||||
self->state_timer=0;
|
|
||||||
}
|
|
||||||
char logmsg[MSGLEN+1]="";
|
|
||||||
snprintf(logmsg, MSGLEN,"CAM:(cb_getstate) Entering NetWatchRegisterTimer");
|
|
||||||
SICSLogWrite(logmsg, eLog);
|
|
||||||
NetWatchRegisterTimer(&self->state_timer, 500, cb_state_timer, self);
|
|
||||||
snprintf(logmsg, MSGLEN,"CAM:(cb_getstate) Leaving NetWatchRegisterTimer");
|
|
||||||
SICSLogWrite(logmsg, eLog);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -768,7 +758,7 @@ pCounterDriver CreateCam(SConnection *pCon, char *name, char *asynq) {
|
|||||||
SCWrite(pCon, msg, eError);
|
SCWrite(pCon, msg, eError);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
AsyncUnitSetTimeout(pNewCam->asyncUnit, 1000);
|
AsyncUnitSetTimeout(pNewCam->asyncUnit, 60000);
|
||||||
AsyncUnitSetNotify(pNewCam->asyncUnit, pNewCam, CAM_Notify);
|
AsyncUnitSetNotify(pNewCam->asyncUnit, pNewCam, CAM_Notify);
|
||||||
|
|
||||||
pCntDriv = CreateCounterDriver(name, "anstocamera");
|
pCntDriv = CreateCounterDriver(name, "anstocamera");
|
||||||
@@ -793,6 +783,6 @@ pCounterDriver CreateCam(SConnection *pCon, char *name, char *asynq) {
|
|||||||
|
|
||||||
len = strlen(event_signatures[ECA_GET_STATE]);
|
len = strlen(event_signatures[ECA_GET_STATE]);
|
||||||
strncpy(cmd, event_signatures[ECA_GET_STATE], len);
|
strncpy(cmd, event_signatures[ECA_GET_STATE], len);
|
||||||
AsyncUnitSendTxn(pNewCam->asyncUnit, cmd, len, cb_getstate, pNewCam, MSGLEN);
|
NetWatchRegisterTimerPeriodic(&pNewCam->state_timer, 2000, 500, cb_state_timer, pNewCam);
|
||||||
return pCntDriv;
|
return pCntDriv;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user