- Added support for accessing the exe file management functions from scripts
- Fixed a bug in hmdata.c - Fixed an issue with tempoerature writing through RemObjects in mesure - Added auxiliary reflections to tasub - Make maximize use soft motor positions
This commit is contained in:
39
mesure.c
39
mesure.c
@@ -33,6 +33,7 @@
|
||||
#include "fourtable.h"
|
||||
#include "lld.h"
|
||||
#include "stdscan.h"
|
||||
#include "exeman.h"
|
||||
|
||||
extern void SNXFormatTime(char *pBueffel, int iLen);
|
||||
extern float nintf(float f);
|
||||
@@ -993,7 +994,9 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
static float fMax = 10.;
|
||||
int iRet, i,ii, iLF, iNP;
|
||||
char pBueffel[512], pNum[10], pTime[132];
|
||||
pEVControl pEva = NULL;
|
||||
pEVControl pEva = NULL;
|
||||
pDummy pPtr = NULL;
|
||||
pIDrivable pDriv = NULL;
|
||||
|
||||
assert(self);
|
||||
assert(pCon);
|
||||
@@ -1079,7 +1082,20 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
fTemp = -777.77;
|
||||
pEva = (pEVControl)FindCommandData(pServ->pSics,"temperature",
|
||||
"Environment Controller");
|
||||
if(pEva)
|
||||
if(pEva == NULL)
|
||||
{
|
||||
pPtr = (pDummy)FindCommandData(pServ->pSics,"temperature",
|
||||
"RemObject");
|
||||
if(pPtr != NULL)
|
||||
{
|
||||
pDriv = pPtr->pDescriptor->GetInterface(pPtr,DRIVEID);
|
||||
if(pDriv != NULL)
|
||||
{
|
||||
fTemp = pDriv->GetValue(pPtr,pCon);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
iRet = EVCGetPos(pEva, pCon,&fTemp);
|
||||
}
|
||||
@@ -1141,6 +1157,19 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*---------------------------------------------------------------------*/
|
||||
static FILE *openListFile(char *pName){
|
||||
FILE *fd = NULL;
|
||||
pDynString filename = NULL;
|
||||
filename = findBatchFile(pServ->pSics,pName);
|
||||
if(filename != NULL){
|
||||
fd = fopen(GetCharArray(filename),"r");
|
||||
DeleteDynString(filename);
|
||||
} else {
|
||||
fd = fopen(pName,"r");
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
int MesureFile(pMesure self, char *pFile, int iSkip, SConnection *pCon)
|
||||
{
|
||||
@@ -1153,7 +1182,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
assert(pCon);
|
||||
|
||||
/* well before doing a thing, open the list file */
|
||||
fd = fopen(pFile,"r");
|
||||
fd = openListFile(pFile);
|
||||
if(!fd)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: reflection file %s NOT found!",pFile);
|
||||
@@ -1242,7 +1271,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
assert(pCon);
|
||||
|
||||
/* well before doing a thing, open the list file */
|
||||
fd = fopen(pFile,"r");
|
||||
fd = openListFile(pFile);
|
||||
if(!fd)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: reflection file %s NOT found!",pFile);
|
||||
@@ -1301,7 +1330,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
assert(pCon);
|
||||
|
||||
/* well before doing a thing, open the list file */
|
||||
fd = fopen(pFile,"r");
|
||||
fd = openListFile(pFile);
|
||||
if(!fd)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: reflection file %s NOT found!",pFile);
|
||||
|
||||
Reference in New Issue
Block a user