- Fixed some serious bugs in amor2t having to do with recent extensions
- fixed velocity selector code to properly display data at list - got hkl to give proper answers when a psi value was specified and limited psi to 360 max. - fixed a minor spelling error in fitcenter messages - fixed badly working soft zeros with negative sign
This commit is contained in:
11
amor2t.c
11
amor2t.c
@ -931,12 +931,23 @@
|
||||
return 0;
|
||||
}
|
||||
memcpy(pAOM,pNew,sizeof(Amor2T));
|
||||
pAOM->pDriv = CreateDrivableInterface();
|
||||
pAOM->pDes = CreateDescriptor("Amor2T");
|
||||
if(!pAOM->pDriv || !pAOM->pDes )
|
||||
{
|
||||
A2TKill(pNew);
|
||||
SCWrite(pCon,"ERROR: out of memory in Amor2TFactory",eError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* set modified interface functions */
|
||||
pAOM->pDes->GetInterface = A2TGetInterface;
|
||||
pAOM->pDriv->Halt = A2THalt;
|
||||
pAOM->pDes->SaveStatus = NULL;
|
||||
pAOM->pDriv->CheckLimits = ANA2TCheck;
|
||||
pAOM->pDriv->SetValue = ANA2TSetValue;
|
||||
pAOM->pDriv->GetValue = ANA2TGetValue;
|
||||
pAOM->pDriv->CheckStatus = A2TStatus;
|
||||
|
||||
|
||||
/* install commands */
|
||||
|
@ -454,7 +454,7 @@
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
sprintf(pBueffel,"Maximum peak height: %ld\n", self->lPeak);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
sprintf(pBueffel,"Aproximate FWHM: %f\n",self->FWHM);
|
||||
sprintf(pBueffel,"Approximate FWHM: %f\n",self->FWHM);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
return 1;
|
||||
|
27
hkl.c
27
hkl.c
@ -822,6 +822,16 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* some people are stupid.......... */
|
||||
if(myPsi > 360.)
|
||||
{
|
||||
myPsi -= 360;
|
||||
}
|
||||
if(myPsi < .0)
|
||||
{
|
||||
myPsi += 360.;
|
||||
}
|
||||
|
||||
/* no retries if normal beam calculation
|
||||
or specific Hamilton or specific
|
||||
psi requested */
|
||||
@ -901,12 +911,16 @@
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if(iRetry != 1)
|
||||
{
|
||||
sprintf(pBueffel,
|
||||
"ERROR: failed to find a possible setting for %4.1f %4.1f %4.1f %s",
|
||||
fHKL[0], fHKL[1], fHKL[2], "\n Even tried 36 psi settings");
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*-------------------------------------------------------------------------*/
|
||||
int RunHKL(pHKL self, float fHKL[3],
|
||||
float fPsi, int iHamil, SConnection *pCon)
|
||||
@ -1557,13 +1571,16 @@ ente:
|
||||
return 0;
|
||||
}
|
||||
iRet = CalculateSettings(self,fHKL, fPsi, iHamil, fSet,pCon);
|
||||
if(!iRet)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
sprintf(pBueffel,"{ theta = %f, omega = %f, chi = %f, phi = %f",
|
||||
sprintf(pBueffel," theta = %f, omega = %f, chi = %f, phi = %f",
|
||||
fSet[0], fSet[1], fSet[2],fSet[3]);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
if(!iRet)
|
||||
{
|
||||
SCWrite(pCon,
|
||||
"WARNING: Settings violate motor limits or cannot be calculated",
|
||||
eWarning);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*------------------ run */
|
||||
|
7
motor.c
7
motor.c
@ -791,7 +791,14 @@ extern void KillPiPiezo(void *pData);
|
||||
}
|
||||
|
||||
/* apply zeropoint */
|
||||
if(ObVal(self->ParArray,SIGN) < 0.)
|
||||
{
|
||||
fValue += ObVal(self->ParArray,SZERO);
|
||||
}
|
||||
else
|
||||
{
|
||||
fValue -= ObVal(self->ParArray,SZERO);
|
||||
}
|
||||
*fVal = fValue;
|
||||
|
||||
/* apply sign */
|
||||
|
@ -129,8 +129,8 @@ phone setAccess 2
|
||||
adress UNKNOWN
|
||||
adress setAccess 2
|
||||
# Counter counter
|
||||
counter SetPreset 1.000000
|
||||
counter SetMode Preset
|
||||
counter SetPreset 10.000000
|
||||
counter SetMode Timer
|
||||
# Motor som
|
||||
som SoftZero 0.000000
|
||||
som SoftLowerLim 0.000000
|
||||
@ -236,9 +236,9 @@ d1l sign 1.000000
|
||||
d1l InterruptMode 0.000000
|
||||
d1l AccessCode 2.000000
|
||||
# Motor d1r
|
||||
d1r SoftZero 0.000000
|
||||
d1r SoftLowerLim -20.000000
|
||||
d1r SoftUpperLim 20.000000
|
||||
d1r SoftZero 2.000000
|
||||
d1r SoftLowerLim -22.000000
|
||||
d1r SoftUpperLim 18.000000
|
||||
d1r Fixed -1.000000
|
||||
d1r sign 1.000000
|
||||
d1r InterruptMode 0.000000
|
||||
|
Reference in New Issue
Block a user