- Cleaned all old dtatus setting code

This commit is contained in:
2014-07-18 14:02:57 +02:00
parent 6a47bd9441
commit f5e797dd6a
17 changed files with 14 additions and 93 deletions

View File

@ -295,7 +295,6 @@ int StartDevice(pExeList self, char *name, pObjectDescriptor pDes,
taskID = StartDriveTask(pData, pCon, name, fNew);
if(taskID > 0 && self->instStatus != eCounting){
self->instStatus = eDriving;
SetStatus(eDriving);
}
if(taskID > 0 && self->drivePrint == 1){
oldVal = pDrivInt->GetValue(pData, pCon);
@ -307,7 +306,6 @@ int StartDevice(pExeList self, char *name, pObjectDescriptor pDes,
taskID = StartCountTask(pData,pCon,name);
if(taskID > 0){
self->instStatus = eCounting;
SetStatus(eCounting);
}
} else {
SCPrintf(pCon,eLogError, "ERROR: type unkonw, cannot start %s", name);
@ -530,7 +528,6 @@ int PauseExecution(pExeList self)
if(IsCounting(self)){
TaskSignalGroup(self->pTask, IPAUSE, &interrupt, self->waitID);
TaskSignalGroup(self->pTask, IPAUSE, &interrupt, self->runID);
SetStatus(ePaused);
}
return 1;
@ -559,7 +556,6 @@ int ContinueExecution(pExeList self)
if(GetStatus() == ePaused){
TaskSignalGroup(self->pTask, CONTINUE, &interrupt, self->waitID);
TaskSignalGroup(self->pTask, CONTINUE, &interrupt, self->runID);
SetStatus(eCounting);
}
return 1;
}
@ -716,7 +712,6 @@ int Success(SConnection * pCon, SicsInterp * pSics, void *pData,
pExeList self = (pExeList)pData;
eOld = GetStatus();
SetStatus(eRunning);
if(argc > 1){
if(strcmp(argv[1],"RUNDRIVE") == 0){
@ -758,7 +753,6 @@ int Success(SConnection * pCon, SicsInterp * pSics, void *pData,
SCWrite(pCon, "Level done", eValue);
iRet = 1;
}
SetStatus(eEager);
return iRet;
}
/*-------------------------------------------------------------------------*/
@ -894,7 +888,6 @@ int DevExecTask(void *pData)
self->lTask = -1;
self->iRun = 0;
self->instStatus = eEager;
SetStatus(eEager);
/*
This is sort of unclean. Setting DEVERROR has to be done in the
device task function as it is the only one that knows about this.