- Fixed a bug which caused the SICServer to die when a socket was broken.
- Fixed many things in DIFRAC subsystem: * Recoded tcentr.f etc so that the course centering will work and will not go into an endless loop. * fixed boundary overwrites which occurred when yesno or alfnum where uset to get a single character and several were given. * Addeded documentation for DIFRAC - Added tcl-files which support the WWW status system
This commit is contained in:
24
scan.c
24
scan.c
@ -134,6 +134,8 @@ extern void SNXFormatTime(char *pBuffer, int iLen);
|
||||
pIDrivable pDriv = NULL;
|
||||
float fVal;
|
||||
pMotor pMot = NULL;
|
||||
pVarEntry pScanVar = NULL;
|
||||
void *pVoid = NULL;
|
||||
|
||||
assert(self->pSics);
|
||||
assert(self->pCon);
|
||||
@ -286,9 +288,31 @@ extern void SNXFormatTime(char *pBuffer, int iLen);
|
||||
fprintf(self->fd,"%s %s\n",pBuffer,self->pFile);
|
||||
continue;
|
||||
}
|
||||
/*------------ scanzero */
|
||||
pPtr = strstr(pBuffer,"!!SCANZERO!!");
|
||||
if(pPtr)
|
||||
{
|
||||
*pPtr = '\0';
|
||||
/* write zero point of first scan variable if motor */
|
||||
DynarGet(self->pScanVar,0,&pVoid);
|
||||
pScanVar = (pVarEntry)pVoid;
|
||||
if(pScanVar)
|
||||
{
|
||||
pMot = NULL;
|
||||
pMot = FindMotor(self->pSics,pScanVar->Name);
|
||||
if(pMot != NULL)
|
||||
{
|
||||
MotorGetPar(pMot,"softzero",&fVal);
|
||||
fprintf(self->fd,"%s zero = %8.3f\n",pScanVar->Name, fVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* --------- plain text */
|
||||
fprintf(self->fd,"%s",pBuffer);
|
||||
} /* end while */
|
||||
|
||||
|
||||
/* remember position for seeking to it for writing data */
|
||||
self->lPos = ftell(self->fd);
|
||||
|
||||
fclose(fd);
|
||||
|
Reference in New Issue
Block a user