- Fixes to HM code for AMOR TOF
- A couple of TAS fixes - o2t was fixed to work with any drivable - FOCUS was mended to include beam monitor in data file
This commit is contained in:
24
o2t.c
24
o2t.c
@ -8,6 +8,8 @@
|
||||
Mark Koennecke, February 1997
|
||||
|
||||
revised: Mark Koennecke, June 1997
|
||||
|
||||
revised to work with all drivables: Mark Koennecke, July 2002
|
||||
|
||||
Copyright:
|
||||
|
||||
@ -45,14 +47,13 @@
|
||||
#include "fortify.h"
|
||||
#include "sics.h"
|
||||
#include "fupa.h"
|
||||
#include "motor.h"
|
||||
#include "o2t.h"
|
||||
|
||||
typedef struct __SicsO2T {
|
||||
pObjectDescriptor pDes;
|
||||
pIDrivable pDrivInt;
|
||||
pMotor pOmega;
|
||||
pMotor pTheta;
|
||||
pDummy pOmega;
|
||||
pDummy pTheta;
|
||||
} SicsO2T;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
@ -191,6 +192,9 @@
|
||||
pSicsO2T MakeO2T(char *omega, char *theta, SicsInterp *pSics)
|
||||
{
|
||||
pSicsO2T self = NULL;
|
||||
CommandList *pCom = NULL;
|
||||
pIDrivable pDriv = NULL;
|
||||
pDummy pDum = NULL;
|
||||
|
||||
/* allocate memory */
|
||||
self = (pSicsO2T)malloc(sizeof(SicsO2T));
|
||||
@ -205,9 +209,17 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* get motors */
|
||||
self->pOmega = FindMotor(pSics,omega);
|
||||
self->pTheta = FindMotor(pSics,theta);
|
||||
/* get and check drivabels */
|
||||
pCom = FindCommand(pSics,omega);
|
||||
pDum = pCom->pData;
|
||||
if(GetDrivableInterface(pDum) != NULL){
|
||||
self->pOmega = pDum;
|
||||
}
|
||||
pCom = FindCommand(pSics,theta);
|
||||
pDum = pCom->pData;
|
||||
if(GetDrivableInterface(pDum) != NULL){
|
||||
self->pTheta = pDum;
|
||||
}
|
||||
if( (self->pOmega == NULL) || (self->pTheta == NULL) )
|
||||
{
|
||||
DeleteDescriptor(self->pDes);
|
||||
|
Reference in New Issue
Block a user