- Removed SCStart/EndBuffering as far as possible and fixed an issue with

the capture command in that it not put resluts into the Tcl interpreter.
  This broke scriptcontext scripts in complicated situations.
- Resolved some issues with the TAS calculation and negative scattering sense.
- Fixed a bug which did not reset the state to idle after checking
  reachability in confvirtualmot.c
This commit is contained in:
koennecke
2012-10-29 12:56:30 +00:00
parent 013c96526e
commit 28cea49d01
6 changed files with 53 additions and 26 deletions

View File

@ -24,6 +24,7 @@
#define RUNNING 1
#define WAITSTOP 2
#define WAITSLIT 3
#define WAITIDLE 4
/* ---------------------------- motor names --------------------*/
#define A2 "a2rot"
#define A2R "d2r"
@ -153,8 +154,11 @@ static long eigera2SetValue(void *data, SConnection *pCon, float val){
self = (eigera2)data;
if(self->state != IDLE){
SCWrite(pCon,"ERROR: Eiger A2 still busy...", eLogError);
return HWFault;
SCWrite(pCon,"WARNING: stopping busy A2", eLogError);
self->a2Target = val;
eigera2Halt(data);
self->state = WAITIDLE;
return OKOK;
}
self->a2Target = val;
setNewMotorTarget(self->motorList,A2,self->a2Target);
@ -204,6 +208,15 @@ static int eigera2CheckStatus(void *data, SConnection *pCon){
self = (eigera2)data;
switch(self->state){
case WAITIDLE:
status = self->listDriv->CheckStatus(&self->motorList,pCon);
if(status == HWFault || status == HWIdle){
self->state = IDLE;
eigera2SetValue(data,pCon, self->a2Target);
} else {
return status;
}
break;
case RUNNING:
case WAITSLIT:
status = self->listDriv->CheckStatus(&self->motorList,pCon);