- Currently disabled attempts at logging commands
- Added a warning for excessive data rates on monitors - Added statistics to devser and thus to scriptcontext - Added byte concatenation to dynstring - Added aborting for reflection generation to fourmess.c - Added data checksum testing to hipadaba, use for update tests - Fixed interrupt discovery in network.c, caused invalid interrupt codes which in turn confused sicscron which had to be fixed too. - Renamed ubcalc into ubcalcint in order to reclaim the ubcalc for Jurg - Added an a3offset to tasub in order to fix what I perceive an IS problem - Added support for the newer version of the Siemens SPS, the S7 - Added a not yet fully working sinqhttpopt driver which talks to http HM without libghttp
This commit is contained in:
36
delcam.c
36
delcam.c
@ -43,6 +43,7 @@
|
||||
typedef struct {
|
||||
AUD_HANDLE aud_handle;
|
||||
int amplictrl;
|
||||
int amplion;
|
||||
int shutterctrl;
|
||||
int nClear;
|
||||
int running;
|
||||
@ -76,6 +77,16 @@ static int DelcamConfigure(pHistDriver self, SConnection * pCon,
|
||||
SCWrite(pCon, "ERROR: invalid amplictrl value, range 0 - 8", eError);
|
||||
pPriv->amplictrl = 0;
|
||||
}
|
||||
if (StringDictGet(pOpt, "amplion", buffer, 79) == 1) {
|
||||
pPriv->amplion = atoi(buffer);
|
||||
} else {
|
||||
pPriv->amplion = 1;
|
||||
}
|
||||
if(pPriv->amplion != 0 && pPriv->amplion != 1){
|
||||
SCWrite(pCon, "ERROR: invalid amplion value, 0,1 allowed", eError);
|
||||
pPriv->amplion = 1;
|
||||
}
|
||||
|
||||
if (StringDictGet(pOpt, "shutterctrl", buffer, 79) == 1) {
|
||||
pPriv->shutterctrl = atoi(buffer);
|
||||
} else {
|
||||
@ -252,6 +263,7 @@ static int DelcamCountStatus(pHistDriver self, SConnection * pCon)
|
||||
return HWBusy;
|
||||
}
|
||||
if (status != HWBusy && pPriv->running == 1) {
|
||||
pPriv->count->pDriv->ReadValues(pPriv->count->pDriv);
|
||||
pPriv->running = 0;
|
||||
/*
|
||||
* stop the CCD and transfer data
|
||||
@ -267,21 +279,23 @@ static int DelcamCountStatus(pHistDriver self, SConnection * pCon)
|
||||
}
|
||||
usleep(SHUTTER_DELAY * 1000);
|
||||
}
|
||||
status = aud_amplifier_set(pPriv->aud_handle, 1);
|
||||
if (status != 0) {
|
||||
snprintf(buffer, 80, "ERROR: failed to stop amplifier, errno = %d",
|
||||
errno);
|
||||
SCWrite(pCon, buffer, eError);
|
||||
pPriv->error = FAULT;
|
||||
status = HWFault;
|
||||
if(pPriv->amplion == 1){
|
||||
status = aud_amplifier_set(pPriv->aud_handle, 1);
|
||||
if (status != 0) {
|
||||
snprintf(buffer, 80, "ERROR: failed to start amplifier, errno = %d",
|
||||
errno);
|
||||
SCWrite(pCon, buffer, eError);
|
||||
pPriv->error = FAULT;
|
||||
status = HWFault;
|
||||
}
|
||||
usleep(AMPLIFIER_DELAY*1000);
|
||||
}
|
||||
/* usleep(AMPLIFIER_DELAY*1000); */
|
||||
|
||||
|
||||
usleep(pPriv->schnarch * 1000);
|
||||
|
||||
SCWrite(pCon,
|
||||
"WARNING: computer freeze for ~15 sec is normal during readout",
|
||||
"WARNING: starting readout, computer freeze for ~15 sec is normal during readout",
|
||||
eWarning);
|
||||
|
||||
status = aud_image_read(pPriv->aud_handle, &shittyCompiler,
|
||||
@ -301,7 +315,10 @@ static int DelcamCountStatus(pHistDriver self, SConnection * pCon)
|
||||
}
|
||||
free(imData);
|
||||
}
|
||||
SCWrite(pCon,
|
||||
"WARNING: CCD read",eWarning);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -506,6 +523,7 @@ pHistDriver MakeDelcamHM(pStringDict pOption)
|
||||
|
||||
/* add our options */
|
||||
StringDictAddPair(pOption, "amplictrl", "0");
|
||||
StringDictAddPair(pOption, "amplion", "1");
|
||||
StringDictAddPair(pOption, "shutterctrl", "0");
|
||||
StringDictAddPair(pOption, "clear", "1");
|
||||
StringDictAddPair(pOption, "schnarch", "1");
|
||||
|
Reference in New Issue
Block a user