- Fixed bugs in sinqhttp.c, most notatbly the unknown error on hm init
- Added first slit to amorset - Added untested code for the POLDI strees machine
This commit is contained in:
26
julcho.c
26
julcho.c
@@ -17,6 +17,7 @@
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
#include <sics.h>
|
||||
#include <unistd.h>
|
||||
#define CHOCOINTERNAL
|
||||
#include <choco.h>
|
||||
#include <SCinter.h>
|
||||
@@ -41,6 +42,8 @@
|
||||
/*--------------------- update flags -------------------------------------*/
|
||||
#define ALL 1
|
||||
#define SPEED 2
|
||||
/*--------------------- wait after set -----------------------------------*/
|
||||
#define STWAIT 5
|
||||
/*------------------------- chopper internal names -----------------------*/
|
||||
#define CH1N "snail"
|
||||
#define CH2N "master"
|
||||
@@ -381,6 +384,7 @@ static int ReadJulChoFlags(pJulCho self){
|
||||
char reply[256];
|
||||
|
||||
status = JulChoTransact(self,"RSC",reply,255);
|
||||
/* fprintf(stdout,"Chopper flags = %s\n", reply);*/
|
||||
if(status < 0){
|
||||
self->errorCode = status;
|
||||
return 0;
|
||||
@@ -911,6 +915,12 @@ static int JulChoSetPar2(pCodri pDriv, char *parname, char *pValue){
|
||||
self->errorCode = status;
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* The SicsWait is here to allow the chopper to update his status flags.
|
||||
* There were occurrences where the chopper was still driving but the
|
||||
* status flag did not reflect this.
|
||||
*/
|
||||
SicsWait(STWAIT);
|
||||
self->lastUpdate = 0;
|
||||
return status;
|
||||
}
|
||||
@@ -958,6 +968,12 @@ static int JulChoSetPar(pCodri pDriv, char *parname, float fValue){
|
||||
self->errorCode = status;
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* The SicsWait is here to allow the chopper to update his status flags.
|
||||
* There were occurrences where the chopper was still driving but the
|
||||
* status flag did not reflect this.
|
||||
*/
|
||||
SicsWait(STWAIT);
|
||||
self->lastUpdate = 0;
|
||||
return status;
|
||||
}
|
||||
@@ -1015,8 +1031,8 @@ static int JulChoGetPar(pCodri pDriv, char *parname,
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int JulChoCheckPar(pCodri pDriv, char *parname){
|
||||
pJulCho self = NULL;
|
||||
int i;
|
||||
char path[256];
|
||||
int i, status;
|
||||
char path[256], reply[256];
|
||||
pHdb target = NULL;
|
||||
char *chNames[] = {CH1N,
|
||||
CH2N,
|
||||
@@ -1052,6 +1068,12 @@ static int JulChoCheckPar(pCodri pDriv, char *parname){
|
||||
return HWBusy;
|
||||
}
|
||||
}
|
||||
status = JulChoTransact(self,"RSC",reply,255);
|
||||
if(status < 0){
|
||||
self->errorCode = status;
|
||||
return HWFault;
|
||||
}
|
||||
/* fprintf(stdout,"Chopper Flags at finish: %s\n", reply);*/
|
||||
return HWIdle;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user