mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 12:57:13 +02:00
eiger setting dac works now and setsettings.. need to work on trimbits
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@620 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
Binary file not shown.
@ -1,7 +1,6 @@
|
|||||||
#ifdef SLS_DETECTOR_FUNCTION_LIST
|
#ifdef SLS_DETECTOR_FUNCTION_LIST
|
||||||
|
|
||||||
#include "slsDetectorFunctionList.h"
|
#include "slsDetectorFunctionList.h"
|
||||||
#include "slsDetectorServer_defs.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -40,6 +39,7 @@ int sChan, sChip, sMod, sDac, sAdc;
|
|||||||
int nModBoard;
|
int nModBoard;
|
||||||
extern int dataBytes;
|
extern int dataBytes;
|
||||||
|
|
||||||
|
int dacvalues[NDAC];
|
||||||
|
|
||||||
/** temporary
|
/** temporary
|
||||||
u_int32_t CSP0BASE;
|
u_int32_t CSP0BASE;
|
||||||
@ -221,17 +221,21 @@ int detectorTest( enum digitalTestMode arg){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
double setDAC(enum dacIndex ind, double val, int imod){
|
int setDAC(enum detDacIndex ind, int val, int imod){
|
||||||
|
|
||||||
|
if (val >= 0)
|
||||||
|
dacvalues[(int)ind] = val;
|
||||||
|
|
||||||
//template initDACbyIndexDACU from mcb_funcs.c
|
//template initDACbyIndexDACU from mcb_funcs.c
|
||||||
|
|
||||||
//check that slsDetectorServer_funcs.c set_dac() has all the specific dac enums
|
//check that slsDetectorServer_funcs.c set_dac() has all the specific dac enums
|
||||||
//set dac and write to a register in fpga to remember dac value when server restarts
|
//set dac and write to a register in fpga to remember dac value when server restarts
|
||||||
return 0;
|
return dacvalues[(int)ind];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
double getADC(enum dacIndex ind, int imod){
|
int getADC(enum detDacIndex ind, int imod){
|
||||||
//get adc value
|
//get adc value
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -263,7 +267,7 @@ int setThresholdEnergy(int thr, int imod){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum detectorSettings setSettings(enum detectorSettings sett, int imod){
|
enum detDacIndex setSettings(enum detDacIndex sett, int imod){
|
||||||
//template setSettings() from mcb_funcs.c
|
//template setSettings() from mcb_funcs.c
|
||||||
//reads the dac registers from fpga to confirm which settings, if weird, undefined
|
//reads the dac registers from fpga to confirm which settings, if weird, undefined
|
||||||
|
|
||||||
|
@ -27,5 +27,10 @@
|
|||||||
|
|
||||||
#define DYNAMIC_RANGE 16
|
#define DYNAMIC_RANGE 16
|
||||||
|
|
||||||
|
#ifdef EIGERD
|
||||||
|
enum detDacIndex{SVP,SVN,VTR,VRF,VRS,VTGSTV,VCMP_LL,VCMP_LR,CAL,VCMP_RL,VCMP_RR,RXB_RB,RXB_LB,VCP,VCN,VIS};
|
||||||
|
#else
|
||||||
|
enum detDacIndex{none};
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* SLSDETECTORSERVER_DEFS_H_ */
|
#endif /* SLSDETECTORSERVER_DEFS_H_ */
|
||||||
|
Reference in New Issue
Block a user