Merge branch 'master' into maverick

- Removed epicsmotor from motor.c
- Fixed a bad define in tasscanub.h
Conflicts:
	makefile_macosx
This commit is contained in:
2015-03-17 14:01:40 +01:00
85 changed files with 2332 additions and 459 deletions

View File

@ -182,12 +182,13 @@ pExeList CreateExeList(pTaskMan pTask)
pRes->waitID = -1;
pRes->runID = -1;
pRes->iLock = 0;
pRes->drivePrint = 0;
pRes->drivePrint = 0;
pRes->paused = 0;
pRes->taskRunning = 0;
pRes->pCall = CreateCallBackInterface();
pRes->lastRun = time(NULL);
pRes->pDes->GetInterface = DevexecInterface;
pRes->instStatus = eEager;
return pRes;
}
@ -295,7 +296,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 +307,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 +529,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 +557,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 +713,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 +754,6 @@ int Success(SConnection * pCon, SicsInterp * pSics, void *pData,
SCWrite(pCon, "Level done", eValue);
iRet = 1;
}
SetStatus(eEager);
return iRet;
}
/*-------------------------------------------------------------------------*/
@ -894,7 +889,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.
@ -965,3 +959,12 @@ void SetDevexecStatus(pExeList pExe, int code)
pExe->iStatus = code;
}
}
/*------------------------------------------------------------------------*/
int GetDevExecInstStatus(pExeList self)
{
if(self->lTask < 0){
return eEager;
} else {
return self->instStatus;
}
}