Cleaned up ANSTO code to merge with sinqdev.sics
This is our new RELEASE-4_0 branch which was taken from ansto/93d9a7c Conflicts: .gitignore SICSmain.c asynnet.c confvirtualmot.c counter.c devexec.c drive.c event.h exebuf.c exeman.c histmem.c interface.h motor.c motorlist.c motorsec.c multicounter.c napi.c napi.h napi4.c network.c nwatch.c nxscript.c nxxml.c nxxml.h ofac.c reflist.c scan.c sicshipadaba.c sicsobj.c site_ansto/docs/Copyright.txt site_ansto/instrument/lyrebird/config/tasmad/sicscommon/nxsupport.tcl site_ansto/instrument/lyrebird/config/tasmad/taspub_sics/tasscript.tcl statusfile.c tasdrive.c tasub.c tasub.h tasublib.c tasublib.h
This commit is contained in:
10
frame.c
10
frame.c
@@ -19,8 +19,8 @@
|
||||
#include "HistMem.h"
|
||||
#include "HistMem.i"
|
||||
#include "HistDriv.i"
|
||||
#include "psi/hardsup/sinqhm.h"
|
||||
#include "psi/sinqhmdriv.i"
|
||||
#include "sicspsi/hardsup/sinqhm.h"
|
||||
#include "sicspsi/sinqhmdriv.i"
|
||||
#include "nxdict.h"
|
||||
#include "frame.h"
|
||||
|
||||
@@ -66,7 +66,7 @@ static int readHMFrame(SConnection * pCon, pHistMem pHM,
|
||||
if (nFrame >= noTimeBins) {
|
||||
nFrame = noTimeBins - 1;
|
||||
}
|
||||
if (isSINQHMDriv(pHM->pDriv) && noTimeBins > 2) {
|
||||
if (!isSecondGen(pHM) && isSINQHMDriv(pHM->pDriv) && noTimeBins > 2) {
|
||||
/*
|
||||
read from HM. The 5 is PROJECT__FRAME in Sinqhm_def.h
|
||||
Again: be friendly: fix out of range frames
|
||||
@@ -81,7 +81,7 @@ static int readHMFrame(SConnection * pCon, pHistMem pHM,
|
||||
free(buffer);
|
||||
return 0;
|
||||
}
|
||||
} else if(isSINQHTTP(pHM->pDriv) && noTimeBins > 2){
|
||||
} else if(!isSecondGen(pHM) && isSINQHTTP(pHM->pDriv) && noTimeBins > 2){
|
||||
if(sansflag){
|
||||
snprintf(histCommand,132,"sample:0:%d:%d:%d", iDim[0]*iDim[1], nFrame, nFrame+1);
|
||||
} else {
|
||||
@@ -244,7 +244,7 @@ int PSDFrameAction(SConnection * pCon, SicsInterp * pSics, void *pData,
|
||||
eError);
|
||||
return 0;
|
||||
}
|
||||
pHM = (pHistMem) FindCommandData(pSics, argv[2], "HistMem");
|
||||
pHM = (pHistMem) FindHM(pSics, argv[2]);
|
||||
if (pHM == NULL) {
|
||||
SCWrite(pCon, "ERROR: Did not find histogram memory", eError);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user