- Added Sycamore protocol and command context to SICS
- Added sinfo to SICS - Added driver for TCP/IP Astrium velocity selector - Added driver for TCP/IP Astrium chopper controller SKIPPED: psi/amor2t.c psi/amorstat.c psi/dornier2.c psi/ecb.c psi/el734hp.c psi/fowrite.c psi/libpsi.a psi/make_gen psi/nextrics.c psi/pardef.c psi/pimotor.c psi/pipiezo.c psi/polterwrite.c psi/psi.c psi/scontroller.c psi/serial.c psi/tasinit.c psi/tasscan.c psi/tcpdocho.c psi/tcpdornier.c psi/tricssupport.c psi/velodornier.c
This commit is contained in:
35
hkl.c
35
hkl.c
@ -205,7 +205,8 @@
|
||||
#include "selvar.i"
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
static int HKLCallback(int iEvent, void *pEvent, void *pUser)
|
||||
static int HKLCallback(int iEvent, void *pEvent, void *pUser,
|
||||
commandContext cc)
|
||||
{
|
||||
pHKL self = NULL;
|
||||
pSelVar pVar = NULL;
|
||||
@ -236,6 +237,7 @@
|
||||
pICallBack pCall = NULL, pCall2 = NULL;
|
||||
pDummy pDum = NULL;
|
||||
float fVal;
|
||||
commandContext comCon;
|
||||
|
||||
assert(pCon);
|
||||
assert(self);
|
||||
@ -264,7 +266,10 @@
|
||||
}
|
||||
|
||||
/* install new callback */
|
||||
comCon.transID = 0;
|
||||
strncpy(comCon.deviceID,"internal",SCDEVIDLEN);
|
||||
self->lID = RegisterCallback(pCall2,
|
||||
comCon,
|
||||
WLCHANGE,
|
||||
HKLCallback,
|
||||
self,
|
||||
@ -673,7 +678,7 @@ static int calculateNormalBeam(MATRIX z1, pHKL self, SConnection *pCon,
|
||||
float fSet[4], double myPsi, int iRetry)
|
||||
{
|
||||
int i, iTest;
|
||||
double stt, om, chi, phi, gamma, nu, psi;
|
||||
double stt, om, chi, phi, gamma, nu, psi, omnb;
|
||||
float currentPhi, currentChi;
|
||||
double ompsi, chipsi, phipsi;
|
||||
MATRIX chim, phim, z4, z3;
|
||||
@ -694,6 +699,7 @@ static int calculateNormalBeam(MATRIX z1, pHKL self, SConnection *pCon,
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
phim = mat_creat(3,3,ZERO_MATRIX);
|
||||
phimat(phim,(double)currentPhi);
|
||||
z4 = mat_mul(phim,z1);
|
||||
@ -703,6 +709,31 @@ static int calculateNormalBeam(MATRIX z1, pHKL self, SConnection *pCon,
|
||||
mat_free(phim);
|
||||
mat_free(chim);
|
||||
mat_free(z4);
|
||||
*/
|
||||
|
||||
if(!z1mToNormalBeam(self->fLambda, z1, &gamma, &omnb, &nu)){
|
||||
return 0;
|
||||
}
|
||||
if(checkNormalBeam(omnb, &gamma, nu,fSet,pCon,self)){
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(!z1mToBisecting(self->fLambda,z1,&stt,&om,&chi,&phi))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if(bisToNormalBeam(stt,om,chi,phi,
|
||||
&omnb, &gamma, &nu))
|
||||
{
|
||||
/* om = -om + 180.; */
|
||||
if(checkNormalBeam(omnb, &gamma, nu,fSet,pCon,self))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
/*
|
||||
do the bisecting angles first
|
||||
|
Reference in New Issue
Block a user