- Created a modified swithc motor which takes into account the new motor drivers

- Added the missing linux_def file into the repository
- Fixed a bug relating to scattering sense in selector.c


SKIPPED:
	psi/make_gen
	psi/psi.c
	psi/swmotor.h
	psi/swmotor2.c
This commit is contained in:
cvs
2003-08-20 14:32:52 +00:00
parent 189f7563b6
commit 3acf49ba53
2 changed files with 44 additions and 17 deletions

12
linux_def Normal file
View File

@ -0,0 +1,12 @@
#--------------------------------------------------------------------------
# general defines used within the PSI makefile hierarchy
#
# Mark Koennecke, July 2003
#-------------------------------------------------------------------------
#DFORTIFY= -DFORTIFY
#FORTIFYOBJ= fortify.o strdup.o
MFLAGS= -f makefile_linux
HDFROOT=/afs/.psi.ch/project/sinq/linux

View File

@ -555,7 +555,8 @@ end:
{
return 0;
}
pDrivInt = self->pTwoTheta->pDescriptor->GetInterface(self->pTwoTheta,DRIVEID);
pDrivInt = self->pTwoTheta->pDescriptor->GetInterface(self->pTwoTheta,
DRIVEID);
if(!pDrivInt->CheckLimits(self->pTwoTheta,sNeu.fTwoTheta,
error,iErrLen))
{
@ -594,7 +595,8 @@ end:
pDrivInt->Halt(self->pTheta);
}
pDrivInt = self->pTwoTheta->pDescriptor->GetInterface(self->pTwoTheta,DRIVEID);
pDrivInt = self->pTwoTheta->pDescriptor->GetInterface(self->pTwoTheta,
DRIVEID);
if(pDrivInt)
{
pDrivInt->Halt(self->pTwoTheta);
@ -602,7 +604,8 @@ end:
if(self->pBend1)
{
pDrivInt = self->pBend1->pDescriptor->GetInterface(self->pBend1,DRIVEID);
pDrivInt = self->pBend1->pDescriptor->GetInterface(self->pBend1,
DRIVEID);
if(pDrivInt)
{
pDrivInt->Halt(self->pBend1);
@ -610,7 +613,8 @@ end:
}
if(self->pBend2)
{
pDrivInt = self->pBend2->pDescriptor->GetInterface(self->pBend2,DRIVEID);
pDrivInt = self->pBend2->pDescriptor->GetInterface(self->pBend2,
DRIVEID);
if(pDrivInt)
{
pDrivInt->Halt(self->pBend2);
@ -646,14 +650,16 @@ end:
}
/* start each motor in turn */
iRet = StartDevice(GetExecutor(),self->pTheta->name, self->pTheta->pDescriptor,
iRet = StartDevice(GetExecutor(),self->pTheta->name,
self->pTheta->pDescriptor,
self->pTheta,
pCon,sNeu.fTheta);
if(!iRet)
{
return 0;
}
iRet = StartDevice(GetExecutor(),self->pTwoTheta->name, self->pTwoTheta->pDescriptor,
iRet = StartDevice(GetExecutor(),self->pTwoTheta->name,
self->pTwoTheta->pDescriptor,
self->pTwoTheta,
pCon,sNeu.fTwoTheta);
if(!iRet)
@ -665,7 +671,8 @@ end:
/* bending motors */
if(self->pBend1)
{
iRet = StartDevice(GetExecutor(),self->pBend1->name, self->pBend1->pDescriptor,
iRet = StartDevice(GetExecutor(),self->pBend1->name,
self->pBend1->pDescriptor,
self->pBend1,
pCon,sNeu.fVert);
if(!iRet)
@ -676,7 +683,8 @@ end:
}
if(self->pBend2)
{
iRet = StartDevice(GetExecutor(),self->pBend2->name, self->pBend2->pDescriptor,
iRet = StartDevice(GetExecutor(),self->pBend2->name,
self->pBend2->pDescriptor,
self->pBend2,
pCon,sNeu.fHor);
if(!iRet)
@ -684,7 +692,7 @@ end:
return 0;
}
}
return OKOK;
}
/*--------------------------------------------------------------------------*/
int MonoCheck(pSicsSelector self, SConnection *pCon)
@ -703,7 +711,8 @@ end:
}
}
pDrivInt = self->pTwoTheta->pDescriptor->GetInterface(self->pTwoTheta,DRIVEID);
pDrivInt = self->pTwoTheta->pDescriptor->GetInterface(self->pTwoTheta,
DRIVEID);
if(pDrivInt)
{
iRet = pDrivInt->CheckStatus(self->pTwoTheta,pCon);
@ -715,7 +724,8 @@ end:
if(self->pBend1)
{
pDrivInt = self->pBend1->pDescriptor->GetInterface(self->pBend1,DRIVEID);
pDrivInt = self->pBend1->pDescriptor->GetInterface(self->pBend1,
DRIVEID);
if(pDrivInt)
{
iRet = pDrivInt->CheckStatus(self->pBend1,pCon);
@ -728,7 +738,8 @@ end:
if(self->pBend2)
{
pDrivInt = self->pBend2->pDescriptor->GetInterface(self->pBend2,DRIVEID);
pDrivInt = self->pBend2->pDescriptor->GetInterface(self->pBend2,
DRIVEID);
if(pDrivInt)
{
iRet = pDrivInt->CheckStatus(self->pBend2,pCon);
@ -764,7 +775,8 @@ end:
iRet = MotorGetSoftPosition(self->pTwoTheta,pCon,&fTwoTheta);
if(!iRet)
{
sprintf(pBueffel,"ERROR: cannot read TwoTheta motor for monochromator %s\n",
sprintf(pBueffel,
"ERROR: cannot read TwoTheta motor for monochromator %s\n",
self->name);
SCWrite(pCon,pBueffel,eError);
return 0.;
@ -784,7 +796,7 @@ end:
dTheta =(double)fTheta;
dTheta = dTheta *(1.0/RD);
fVal = 2.0 * (double)ObVal(self->pParams,LATD);
fVal = fVal * sin(dTheta);
fVal = fVal * sin(dTheta) * ObVal(self->pParams,SS);
return fVal;
}
/*--------------------------------------------------------------------------*/
@ -805,7 +817,8 @@ end:
iRet = MotorGetSoftPosition(self->pTwoTheta,pCon,f2TH);
if(!iRet)
{
sprintf(pBueffel,"ERROR: cannot read TwoTheta motor for monochromator %s\n",
sprintf(pBueffel,
"ERROR: cannot read TwoTheta motor for monochromator %s\n",
self->name);
SCWrite(pCon,pBueffel,eError);
return 0.;
@ -816,7 +829,8 @@ end:
iRet = MotorGetSoftPosition(self->pBend1,pCon,fB1);
if(!iRet)
{
sprintf(pBueffel,"ERROR: cannot read vertical bender motor for monochromator %s\n",
sprintf(pBueffel,
"ERROR: cannot read vertical bender motor for monochromator %s\n",
self->name);
SCWrite(pCon,pBueffel,eError);
return 0.;
@ -827,7 +841,8 @@ end:
iRet = MotorGetSoftPosition(self->pBend2,pCon,fB2);
if(!iRet)
{
sprintf(pBueffel,"ERROR: cannot read horizontal bender motor for monochromator %s\n",
sprintf(pBueffel,
"ERROR: cannot read horizontal bender motor for monochromator %s\n",
self->name);
SCWrite(pCon,pBueffel,eError);
return 0.;