- Fixed prolem wit core dump from commandlog
- Added fulltransact which sends a TRANSACTIONSTART meesage in addition to TRANSASCTIONFINISHED - Added parameter to motor which allows to ignore positioning faults - ADDED POLAN support to tasscan
This commit is contained in:
31
tasscan.c
31
tasscan.c
@ -85,6 +85,33 @@ static void strcenter(char *str, char *target, int iLength)
|
||||
}
|
||||
target[iLength-1] = '\0';
|
||||
}
|
||||
/*-----------------------------------------------------------------------
|
||||
helper function for TASHeader
|
||||
------------------------------------------------------------------------*/
|
||||
static void writePolFile(FILE *fd, pTASdata pTAS){
|
||||
char pLine[132];
|
||||
FILE *fpol = NULL;
|
||||
|
||||
assert(fd);
|
||||
assert(pTAS);
|
||||
|
||||
fpol = fopen(pTAS->tasPar[POLFIL]->text,"r");
|
||||
if(!fpol){
|
||||
/*
|
||||
error gets reported anyway later on
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
while(fgets(pLine,131,fpol) != NULL){
|
||||
if(strstr(pLine,"\n") == NULL){
|
||||
fprintf(fd,"POLAN: %s\n", pLine);
|
||||
} else {
|
||||
fprintf(fd,"POLAN: %s", pLine);
|
||||
}
|
||||
}
|
||||
fclose(fpol);
|
||||
}
|
||||
/*-------------------------------------------------------------------------
|
||||
TASHeader writes the header of a TAS data file. The format is an
|
||||
obscure format from ILL ( not ill but Institute Laue Langevin). No
|
||||
@ -307,6 +334,10 @@ static int TASHeader(pScanData self)
|
||||
}
|
||||
fprintf(self->fd,"\n");
|
||||
|
||||
if(pTAS->iPOL >= 0){
|
||||
writePolFile(self->fd,pTAS);
|
||||
}
|
||||
|
||||
/*
|
||||
write counter parameters
|
||||
*/
|
||||
|
Reference in New Issue
Block a user