diff --git a/anticollider.c b/anticollider.c index 3ccc82a8..f5d7f7aa 100644 --- a/anticollider.c +++ b/anticollider.c @@ -162,7 +162,10 @@ static int ColliderCheckStatus(void *pData, SConnection *pCon){ Most of these are dummies........ -----------------------------------------------------------------------*/ static int ColliderHalt(void *pData){ - StopExe(pServ->pExecutor,"all"); + pAntiCollider self = (pAntiCollider) pData; + + StopAllMotors(self->motorList); + self->level = 999999999; return 1; } /*---------------------------------------------------------------------*/ @@ -178,7 +181,7 @@ static float ColliderGetValue(void *self, SConnection *pCon){ int StartLevel(int level, int sequenceList, int motorList, SConnection *pCon){ Sequence seq; pMotReg pMot = NULL; - int iRet; + int iRet, status; int count = 0; char pBueffel[132]; @@ -188,8 +191,10 @@ int StartLevel(int level, int sequenceList, int motorList, SConnection *pCon){ if(seq.level == level){ pMot = FindMotEntry(motorList,seq.pMotor); if(pMot){ - StartRegMot(pMot,pCon,seq.target); - count++; + status = StartRegMot(pMot,pCon,seq.target); + if(status){ + count++; + } } else { sprintf(pBueffel,"ERROR: motor %s, requested from anticollider script", seq.pMotor); diff --git a/counter.c b/counter.c index d968e9e8..e2b21714 100644 --- a/counter.c +++ b/counter.c @@ -154,7 +154,8 @@ iRet = self->pDriv->TryAndFixIt(self->pDriv,iErr); if(iRet == COTERM) { - SCWrite(pCon,"ERROR: Cannot fix counter problem, aborting",eError); + SCWrite(pCon,"ERROR: Cannot fix counter problem, aborting", + eError); SCSetInterrupt(pCon,eAbortBatch); return HWFault; } diff --git a/drive.c b/drive.c index 6e9b036c..21fd206a 100644 --- a/drive.c +++ b/drive.c @@ -364,12 +364,16 @@ } /* check the completion status */ + if(!(eOld == eScanning || eOld == eBatch)) + { + eOld = eEager; + } if(iRet == DEVERROR) { sprintf(pBueffel,"Driving finished with problem"); SCWrite(pCon,pBueffel,eError); ClearExecutor(GetExecutor()); - SetStatus(eOld); + SetStatus(eOld); return 0; } else if(iRet == DEVINT) diff --git a/makefile_linux b/makefile_linux index 623f274e..64a2c25c 100644 --- a/makefile_linux +++ b/makefile_linux @@ -9,13 +9,11 @@ #NI= -DHAVENI #NIOBJ= nigpib.o #NILIB=-lgpibenet -#--------------------------------------------------------------------------- -include $(SRC)linux_def +include linux_def CC = gcc -CFLAGS = -I$(HDFROOT)/include -DHDF4 -DHDF5 $(NI) \ - -I$(SRC)psi/hardsup -I$(SRC). \ +CFLAGS = -I$(HDFROOT)/include -DHDF4 -DHDF5 $(NI) -Ipsi/hardsup -I. \ -fwritable-strings -DCYGNUS -DNONINTF -g $(DFORTIFY) BINTARGET = bin diff --git a/matrix/makefile_linux b/matrix/makefile_linux index a349e678..2be8fbda 100644 --- a/matrix/makefile_linux +++ b/matrix/makefile_linux @@ -6,7 +6,7 @@ # Markus Zolliker, March 2003 #-------------------------------------------------------------------------- -include ../$(SRC)linux_def +include ../linux_def CC = gcc CFLAGS = -g $(DFORTIFY) diff --git a/motor.c b/motor.c index 23912076..9e1f7a92 100644 --- a/motor.c +++ b/motor.c @@ -13,7 +13,7 @@ Copyright: Labor fuer Neutronenstreuung - Paul Scherrer Institut + Paul Scherrer Institut CH-5423 Villigen-PSI