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:
24
singlex.c
24
singlex.c
@@ -227,6 +227,7 @@ static int findModeIndex(char *mode)
|
||||
"nb",
|
||||
"tas",
|
||||
"binb",
|
||||
"bio",
|
||||
NULL
|
||||
};
|
||||
int count = 0;
|
||||
@@ -254,6 +255,7 @@ static hdbCallbackReturn SetModeCB(pHdb node, void *userData,
|
||||
pTest = trim(set->v->v.text);
|
||||
pCon = set->callData;
|
||||
modeIdx = findModeIndex(pTest);
|
||||
|
||||
switch (modeIdx) {
|
||||
case Bisecting:
|
||||
if (priv->chi == NULL || priv->om == NULL || priv->phi == NULL
|
||||
@@ -269,6 +271,22 @@ static hdbCallbackReturn SetModeCB(pHdb node, void *userData,
|
||||
initializeSingleBisecting(priv->diffractometer);
|
||||
return hdbContinue;
|
||||
break;
|
||||
case BiO:
|
||||
if (priv->chi == NULL || priv->om == NULL || priv->phi == NULL
|
||||
|| priv->stt == NULL) {
|
||||
if (pCon != NULL) {
|
||||
SCWrite(pCon,
|
||||
"ERROR: required motor for bisecting not configured",
|
||||
eError);
|
||||
}
|
||||
return hdbAbort;
|
||||
}
|
||||
priv->mode = Bisecting;
|
||||
initializeSingleBisectingOrion(priv->diffractometer);
|
||||
free(set->v->v.text);
|
||||
set->v->v.text = strdup("bio");
|
||||
return hdbContinue;
|
||||
break;
|
||||
case NB:
|
||||
if (priv->nu == NULL || priv->om == NULL || priv->stt == NULL) {
|
||||
if (pCon != NULL) {
|
||||
@@ -874,7 +892,11 @@ pSICSOBJ SXGetReflectionList()
|
||||
SingleXModes SXGetMode()
|
||||
{
|
||||
pSingleX priv = (pSingleX) singlex->pPrivate;
|
||||
return priv->mode;
|
||||
if(priv->mode == BiO){
|
||||
return Bisecting;
|
||||
} else {
|
||||
return priv->mode;
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user