mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-15 14:27:13 +02:00
slsDetectorUSers re-added to Makefile - don't remove it again
This commit is contained in:
@ -14,10 +14,10 @@ INCLUDES?= -IcommonFiles -IslsDetector -I../slsReceiverSoftware/MySocketTCP -Ius
|
|||||||
|
|
||||||
#EPICSFLAGS=-D EPICS -I/usr/local/epics/base/include/ -I /usr/local/epics/base/include/os/Linux/ -L /usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -Wl,-R/usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -lca -lCom
|
#EPICSFLAGS=-D EPICS -I/usr/local/epics/base/include/ -I /usr/local/epics/base/include/os/Linux/ -L /usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -Wl,-R/usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -lca -lCom
|
||||||
|
|
||||||
SRC_CLNT=slsDetectorAnalysis/fileIO.cpp usersFunctions/usersFunctions.cpp slsDetector/slsDetectorUtils.cpp slsDetector/slsDetectorCommand.cpp slsDetectorAnalysis/angularConversion.cpp slsDetectorAnalysis/angularConversionStatic.cpp slsDetectorAnalysis/energyConversion.cpp slsDetector/slsDetectorActions.cpp slsDetectorAnalysis/postProcessing.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp slsDetectorAnalysis/postProcessingFuncs.cpp slsReceiverInterface/receiverInterface.cpp
|
SRC_CLNT=slsDetectorAnalysis/fileIO.cpp usersFunctions/usersFunctions.cpp slsDetector/slsDetectorUtils.cpp slsDetector/slsDetectorCommand.cpp slsDetectorAnalysis/angularConversion.cpp slsDetectorAnalysis/angularConversionStatic.cpp slsDetectorAnalysis/energyConversion.cpp slsDetector/slsDetectorActions.cpp slsDetectorAnalysis/postProcessing.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp slsDetectorAnalysis/postProcessingFuncs.cpp slsReceiverInterface/receiverInterface.cpp slsDetector/slsDetectorUsers.cpp
|
||||||
|
|
||||||
# ../slsReceiverSoftware/MySocketTCP/MySocketTCP.cpp
|
# ../slsReceiverSoftware/MySocketTCP/MySocketTCP.cpp
|
||||||
# slsDetector/slsDetectorUsers.cpp
|
#
|
||||||
|
|
||||||
$(info )
|
$(info )
|
||||||
$(info #######################################)
|
$(info #######################################)
|
||||||
|
@ -1980,7 +1980,9 @@ u_int16_t* fifo_read_event()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
t = bus_r(LOOK_AT_ME_REG);
|
t = bus_r(LOOK_AT_ME_REG);
|
||||||
|
#ifdef VERBOSE
|
||||||
printf(".");
|
printf(".");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
// printf("%08x %08x\n", runState(), bus_r(LOOK_AT_ME_REG));
|
// printf("%08x %08x\n", runState(), bus_r(LOOK_AT_ME_REG));
|
||||||
/* dma_memcpy(now_ptr,values ,dataBytes); */
|
/* dma_memcpy(now_ptr,values ,dataBytes); */
|
||||||
@ -1995,7 +1997,9 @@ u_int16_t* fifo_read_event()
|
|||||||
/* usleep(10); */
|
/* usleep(10); */
|
||||||
*dum=bus_r16(FIFO_DATA_REG);
|
*dum=bus_r16(FIFO_DATA_REG);
|
||||||
}
|
}
|
||||||
|
#ifdef VERBOSE
|
||||||
printf("*");
|
printf("*");
|
||||||
|
#endif
|
||||||
return ram_values;
|
return ram_values;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2014,7 +2018,11 @@ u_int16_t* fifo_read_frame()
|
|||||||
}
|
}
|
||||||
// printf("%x %d\n",dum, ns);
|
// printf("%x %d\n",dum, ns);
|
||||||
if (ns==0) return NULL;
|
if (ns==0) return NULL;
|
||||||
|
#ifdef VERBOSE
|
||||||
printf("+\n");
|
printf("+\n");
|
||||||
|
#else
|
||||||
|
printf("+");
|
||||||
|
#endif
|
||||||
return ram_values;
|
return ram_values;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2286,7 +2294,7 @@ int prepareADC(){
|
|||||||
|
|
||||||
// writeADC(0x16,0x4);//output clock phase
|
// writeADC(0x16,0x4);//output clock phase
|
||||||
|
|
||||||
writeADC(0x18,0x0);// vref 1V
|
// writeADC(0x18,0x0);// vref 1V
|
||||||
|
|
||||||
writeADC(0x14,0x40);//lvds reduced range -- offset binary
|
writeADC(0x14,0x40);//lvds reduced range -- offset binary
|
||||||
|
|
||||||
@ -3073,6 +3081,10 @@ void initDac(int dacnum) {
|
|||||||
|
|
||||||
int setDacRegister(int dacnum,int dacvalue) {
|
int setDacRegister(int dacnum,int dacvalue) {
|
||||||
int val;
|
int val;
|
||||||
|
if (dacvalue==-100)
|
||||||
|
dacvalue=0xffff;
|
||||||
|
|
||||||
|
|
||||||
if (dacnum%2) {
|
if (dacnum%2) {
|
||||||
val=((dacvalue & 0xffff)<<16) | getDacRegister(dacnum-1);
|
val=((dacvalue & 0xffff)<<16) | getDacRegister(dacnum-1);
|
||||||
} else {
|
} else {
|
||||||
@ -3123,7 +3135,46 @@ int setDac(int dacnum,int dacvalue){
|
|||||||
|
|
||||||
printf("data bit=%d, clkbit=%d, csbit=%d",ddx,cdx,csdx);
|
printf("data bit=%d, clkbit=%d, csbit=%d",ddx,cdx,csdx);
|
||||||
|
|
||||||
codata=((((0x2)<<4)+((dacch)&0xf))<<16)+((dacvalue<<4)&0xfff0);
|
//modified to power down single channels
|
||||||
|
|
||||||
|
// codata=((((0x2)<<4)+((dacch)&0xf))<<16)+((dacvalue<<4)&0xfff0);
|
||||||
|
codata=((((0x3)<<4)+((dacch)&0xf))<<16)+((dacvalue<<4)&0xfff0);
|
||||||
|
valw=0xffff; bus_w(offw,(valw)); // start point
|
||||||
|
valw=((valw&(~(0x1<<csdx))));bus_w(offw,valw); //chip sel bar down
|
||||||
|
for (i=1;i<25;i++) {
|
||||||
|
|
||||||
|
valw=(valw&(~(0x1<<cdx)));bus_w(offw,valw); //cldwn
|
||||||
|
valw=((valw&(~(0x1<<ddx)))+(((codata>>(24-i))&0x1)<<ddx));bus_w(offw,valw);//write data (i)
|
||||||
|
// printf("%d ", ((codata>>(24-i))&0x1));
|
||||||
|
|
||||||
|
|
||||||
|
valw=((valw&(~(0x1<<cdx)))+(0x1<<cdx));bus_w(offw,valw);//clkup
|
||||||
|
}
|
||||||
|
// printf("\n ");
|
||||||
|
|
||||||
|
|
||||||
|
valw=((valw&(~(0x1<<csdx)))+(0x1<<csdx));bus_w(offw,valw); //csup
|
||||||
|
|
||||||
|
valw=(valw&(~(0x1<<cdx)));bus_w(offw,valw); //cldwn
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
valw=0xffff; bus_w(offw,(valw)); // stop point =start point of course */
|
||||||
|
|
||||||
|
|
||||||
|
printf("Writing %d in DAC(0-15) %d \n",dacvalue,dacnum);
|
||||||
|
setDacRegister(dacnum,dacvalue);
|
||||||
|
} else if (dacvalue==-100) {
|
||||||
|
|
||||||
|
printf("switching off dac %d\n", dacnum);
|
||||||
|
|
||||||
|
csdx=dacnum/8+2;
|
||||||
|
|
||||||
|
dacch=dacnum%8;
|
||||||
|
ddx=0; cdx=1;
|
||||||
|
|
||||||
|
codata=((((0x4)<<4)+((dacch)&0xf))<<16)+((dacvalue<<4)&0xfff0);
|
||||||
|
|
||||||
valw=0xffff; bus_w(offw,(valw)); // start point
|
valw=0xffff; bus_w(offw,(valw)); // start point
|
||||||
valw=((valw&(~(0x1<<csdx))));bus_w(offw,valw); //chip sel bar down
|
valw=((valw&(~(0x1<<csdx))));bus_w(offw,valw); //chip sel bar down
|
||||||
@ -3151,8 +3202,13 @@ int setDac(int dacnum,int dacvalue){
|
|||||||
|
|
||||||
printf("Writing %d in DAC(0-15) %d \n",dacvalue,dacnum);
|
printf("Writing %d in DAC(0-15) %d \n",dacvalue,dacnum);
|
||||||
setDacRegister(dacnum,dacvalue);
|
setDacRegister(dacnum,dacvalue);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return getDacRegister(dacnum);
|
return getDacRegister(dacnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -989,43 +989,6 @@ int set_dac(int file_des) {
|
|||||||
|
|
||||||
#ifdef MCB_FUNCS
|
#ifdef MCB_FUNCS
|
||||||
|
|
||||||
/* switch (ind) { */
|
|
||||||
/* case V_DAC0 : */
|
|
||||||
/* idac=VDAC0; */
|
|
||||||
/* break; */
|
|
||||||
/* case V_DAC1: */
|
|
||||||
/* idac=VDAC1; */
|
|
||||||
/* break; */
|
|
||||||
/* case V_DAC2: */
|
|
||||||
/* idac=VDAC2; */
|
|
||||||
/* break; */
|
|
||||||
/* case V_DAC3: */
|
|
||||||
/* idac=VDAC3; */
|
|
||||||
/* break; */
|
|
||||||
/* case V_DAC4: */
|
|
||||||
/* idac=VDAC4; */
|
|
||||||
/* break; */
|
|
||||||
/* case V_DAC5: */
|
|
||||||
/* idac=VDAC5; */
|
|
||||||
/* break; */
|
|
||||||
/* case V_DAC6: */
|
|
||||||
/* idac=VDAC6; */
|
|
||||||
/* break; */
|
|
||||||
/* case V_DAC7: */
|
|
||||||
/* idac=VDAC7; */
|
|
||||||
/* break; */
|
|
||||||
|
|
||||||
/* case HV_POT: */
|
|
||||||
/* idac=HIGH_VOLTAGE; */
|
|
||||||
/* break; */
|
|
||||||
|
|
||||||
/* default: */
|
|
||||||
/* printf("Unknown DAC index %d for Moench\n",ind); */
|
|
||||||
/* sprintf(mess,"Unknown DAC index %d for Moench\n",ind); */
|
|
||||||
/* ret=FAIL; */
|
|
||||||
/* break; */
|
|
||||||
/* } */
|
|
||||||
|
|
||||||
if (ret==OK) {
|
if (ret==OK) {
|
||||||
if (differentClients==1 && lockStatus==1) {
|
if (differentClients==1 && lockStatus==1) {
|
||||||
ret=FAIL;
|
ret=FAIL;
|
||||||
@ -1042,6 +1005,7 @@ int set_dac(int file_des) {
|
|||||||
} else if (val>16535)
|
} else if (val>16535)
|
||||||
val=-1;
|
val=-1;
|
||||||
|
|
||||||
|
|
||||||
retval=setDac(ind,val);
|
retval=setDac(ind,val);
|
||||||
/* if(idac==HIGH_VOLTAGE) */
|
/* if(idac==HIGH_VOLTAGE) */
|
||||||
/* retval=initHighVoltageByModule(val,imod); */
|
/* retval=initHighVoltageByModule(val,imod); */
|
||||||
|
Reference in New Issue
Block a user