- 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:
koennecke
2006-11-24 15:52:51 +00:00
parent d01758de72
commit 8a1a808fe5
17 changed files with 591 additions and 88 deletions

View File

@@ -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;
}
/*---------------------------------------------------------------------------*/