From f37cd6640fef44966a2825979daeea8272b987f3 Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Mon, 29 Oct 2012 17:00:53 +0000 Subject: [PATCH] acquire works with receiver now git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@324 951219d9-93cf-4727-9268-0efd64621fa3 --- .../gotthardDetectorServer/firmware_funcs.c | 14 ++++++++++---- .../gotthardDetectorServer/server_defs.h | 3 ++- .../gotthardDetectorServer/server_funcs.c | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c index a315c9c5e..13fa87e2b 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c @@ -1445,8 +1445,12 @@ int configureMAC(int ipad,long long int macad,long long int servermacad,int ival u_int32_t runBusy(void) { - - return (bus_r(STATUS_REG)&RUN_BUSY_BIT); + u_int32_t s = bus_r(STATUS_REG); + //s=((s & RUN_BUSY_BIT) | (s & READMACHINE_BUSY_BIT)); + //s=(s & RUN_BUSY_BIT); + //if(s!=0x62721) + // printf("status=%x\n",s); + return s; } u_int32_t dataPresent(void) { @@ -1618,8 +1622,10 @@ u_int32_t* fifo_read_event() while ((t&0x1)==0) { t = bus_r(LOOK_AT_ME_REG); - if (!runBusy()) - return NULL; + if (!runBusy()){ + printf("\n\ngonna return null STATUS=%08x\n",runState()); + return NULL; + } } diff --git a/slsDetectorSoftware/gotthardDetectorServer/server_defs.h b/slsDetectorSoftware/gotthardDetectorServer/server_defs.h index 711466251..1ab182ca2 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/server_defs.h +++ b/slsDetectorSoftware/gotthardDetectorServer/server_defs.h @@ -35,7 +35,8 @@ -#define ADCSYNC_VAL 0x32213 +#define ADCSYNC_VAL 0x32113 +//#define ADCSYNC_VAL 0x22113 #ifdef VIRTUAL diff --git a/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c index 6bae72dc8..901e300a7 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c @@ -1939,7 +1939,7 @@ int read_frame(int file_des) { return OK; } else { //might add delay???? - if(getFrames()>-2) { + if(getFrames()>-2) {printf("in hereeee: frames:%d\n",getFrames()); dataret=FAIL; sprintf(mess,"no data and run stopped: %d frames left\n",(int)(getFrames()+2)); printf("%s\n",mess);