- First working version of the TRICS collision protection module
This commit is contained in:
8
nxamor.c
8
nxamor.c
@@ -24,6 +24,7 @@
|
||||
#include "nxamor.h"
|
||||
#include "obpar.h"
|
||||
#include "motor.h"
|
||||
#include "status.h"
|
||||
|
||||
#define MAXMOT 13 /* must be same as in amor2t.c */
|
||||
#include "amor2t.i"
|
||||
@@ -662,6 +663,7 @@ static int WriteTOFDetector(char *name, pHistMem pHM, int *iDim,
|
||||
{
|
||||
char pBueffel[512], *pFile = NULL;
|
||||
int iRet, iFlag;
|
||||
Status oldStatus;
|
||||
|
||||
/*
|
||||
if arguments, check for psdsave
|
||||
@@ -685,11 +687,17 @@ static int WriteTOFDetector(char *name, pHistMem pHM, int *iDim,
|
||||
pFile = SNXMakeFileName(pSics,pCon);
|
||||
sprintf(pBueffel,"Writing file %s .....",pFile);
|
||||
SCWrite(pCon,pBueffel,eWarning);
|
||||
|
||||
oldStatus = GetStatus();
|
||||
SetStatus(eWriting);
|
||||
LockDeviceExecutor(pServ->pExecutor);
|
||||
iRet = WriteAmorHeader(pFile,pCon);
|
||||
if(iRet)
|
||||
{
|
||||
iRet = WriteAmorTOF(pFile,pCon,pMeme);
|
||||
}
|
||||
SetStatus(oldStatus);
|
||||
UnlockDeviceExecutor(pServ->pExecutor);
|
||||
free(pFile);
|
||||
SCSendOK(pCon);
|
||||
return iRet;
|
||||
|
||||
Reference in New Issue
Block a user