From 73424d0376d9b5c98c67d4bce9a51654a77e82fc Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Wed, 15 Aug 2012 15:33:04 +0000 Subject: [PATCH] somehow it works with the receive adc in receieveModule blocked. added DDACS_DOUBLE to makefile to make it work with client git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@221 951219d9-93cf-4727-9268-0efd64621fa3 --- .../gotthardDetectorServer/Makefile | 2 +- .../gotthardDetectorServer/communication_funcs.c | 15 +++++++-------- .../gotthardDetectorServer/server_funcs.c | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/slsDetectorSoftware/gotthardDetectorServer/Makefile b/slsDetectorSoftware/gotthardDetectorServer/Makefile index 3f3f77b2c..f5e50cea2 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/Makefile +++ b/slsDetectorSoftware/gotthardDetectorServer/Makefile @@ -5,7 +5,7 @@ CROSS = bfin-uclinux- CC = $(CROSS)gcc -CFLAGS += -Wall -DMCB_FUNCS #-DVERBOSE -DVERYVERBOSE #-DVIRTUAL +CFLAGS += -Wall -DMCB_FUNCS -DDACS_DOUBLE #-DVERBOSE -DVERYVERBOSE #-DVIRTUAL PROGS= gotthardDetectorServer diff --git a/slsDetectorSoftware/gotthardDetectorServer/communication_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/communication_funcs.c index 3ce534616..200fc0ca9 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/communication_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/communication_funcs.c @@ -419,7 +419,7 @@ int receiveModule(int file_des, sls_detector_module* myMod) { printf("received %d adcs\n",nAdcs); #endif if (ndacdiff<=0) { - ts+=receiveDataOnly(file_des,myMod->dacs, sizeof(double)*nDacs); + ts+=receiveDataOnly(file_des,myMod->dacs, sizeof(dacs_t)*nDacs); #ifdef VERBOSE printf("dacs received\n"); #endif @@ -431,9 +431,9 @@ int receiveModule(int file_des, sls_detector_module* myMod) { free(dacptr); return FAIL; } -/* - if (nadcdiff<=0) { - ts+=receiveDataOnly(file_des,myMod->adcs, sizeof(double)*nAdcs); +// printf("ndacdiff\t11vref_ds:%f\n",myMod->dacs[0]);printf("11vin_cm:%f\n",myMod->dacs[5]); +/* if (nadcdiff<=0) { + ts+=receiveDataOnly(file_des,myMod->adcs, sizeof(dacs_t)*nAdcs); #ifdef VERBOSE printf("adcs received\n"); #endif @@ -444,7 +444,7 @@ int receiveModule(int file_des, sls_detector_module* myMod) { ts+=receiveDataOnly(file_des,adcptr, sizeof(double)*nadcdiff); free(adcptr); return FAIL; - }*/ + } *///printf("nadcdiff\t22vref_ds:%f\n",myMod->dacs[0]);printf("22vin_cm:%f\n",myMod->dacs[5]); if (nchipdiff<=0) { ts+=receiveDataOnly(file_des,myMod->chipregs, sizeof(int)*nChips); #ifdef VERBOSE @@ -457,8 +457,7 @@ int receiveModule(int file_des, sls_detector_module* myMod) { ts+=receiveDataOnly(file_des,chipptr, sizeof(int)*nchipdiff); free(chipptr); return FAIL; - } - + }//printf("nchipdiff\t33vref_ds:%f\n",myMod->dacs[0]);printf("33vin_cm:%f\n",myMod->dacs[5]); if (nchandiff<=0) { ts+=receiveDataOnly(file_des,myMod->chanregs, sizeof(int)*nChans); #ifdef VERBOSE @@ -471,7 +470,7 @@ int receiveModule(int file_des, sls_detector_module* myMod) { ts+=receiveDataOnly(file_des,chanptr, sizeof(int)*nchandiff); free(chanptr); return FAIL; - } + }//printf("nchandiff\t44vref_ds:%f\n",myMod->dacs[0]);printf("44vin_cm:%f\n",myMod->dacs[5]); #ifdef VERBOSE printf("received module %d of size %d register %x\n",myMod->module,ts,myMod->reg); #endif diff --git a/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c index 87a7c3e22..fb2b2d087 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c @@ -1416,7 +1416,7 @@ int set_module(int file_des) { printf("Setting module\n"); #endif ret=receiveModule(file_des, &myModule); - + printf("11vref_ds:%f\n",myModule.dacs[0]);printf("11vin_cm:%f\n",myModule.dacs[5]); if (ret>=0) ret=OK;