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:
@@ -148,8 +148,6 @@ static long SCTDRIVSetValue(void *data, SConnection * pCon, float val)
|
||||
}
|
||||
pPriv->pCon = SCCopyConnection(pCon);
|
||||
|
||||
StopByData(pServ->pExecutor, data);
|
||||
|
||||
v = MakeHdbFloat(val);
|
||||
SetHdbProperty(self->objectNode, "writestatus", "start");
|
||||
status = SetHipadabaPar(self->objectNode, v, pCon);
|
||||
@@ -166,7 +164,7 @@ static long SCTDRIVSetValue(void *data, SConnection * pCon, float val)
|
||||
OKOK or HWIdle when the motor finished driving
|
||||
HWFault when a hardware problem ocurred
|
||||
HWPosFault when the hardware cannot reach a position
|
||||
Errors are duly to be printed to pCon
|
||||
Errors are duely to be printed to pCon
|
||||
For real motors CheckStatus again shall try hard to fix any
|
||||
issues with the motor
|
||||
------------------------------------------------------------------*/
|
||||
@@ -214,11 +212,11 @@ static int SCTDRIVCheckStatus(void *data, SConnection * pCon)
|
||||
SCPrintf(pCon, eError, " script %s returned %s", script, result);
|
||||
}
|
||||
}
|
||||
if (strstr(result, "busy") != NULL) {
|
||||
if (strstr(result, "run") != NULL) {
|
||||
return HWBusy;
|
||||
} else if (strstr(result, "posfault") != NULL) {
|
||||
return HWPosFault;
|
||||
} else if (strstr(result, "fault") != NULL) {
|
||||
} else if (strstr(result, "error") != NULL) {
|
||||
return HWFault;
|
||||
} else if (strstr(result, "idle") != NULL) {
|
||||
return HWIdle;
|
||||
|
||||
Reference in New Issue
Block a user