diff --git a/slsDetectorSoftware/.gitignore b/slsDetectorSoftware/.gitignore index 5761abcfd..752a00776 100644 --- a/slsDetectorSoftware/.gitignore +++ b/slsDetectorSoftware/.gitignore @@ -1 +1,3 @@ *.o +*~ +#*# \ No newline at end of file diff --git a/slsDetectorSoftware/eigerDetectorServer/EigerHighLevelFunctions.c b/slsDetectorSoftware/eigerDetectorServer/EigerHighLevelFunctions.c index 524fe9a42..11c1b3820 100644 --- a/slsDetectorSoftware/eigerDetectorServer/EigerHighLevelFunctions.c +++ b/slsDetectorSoftware/eigerDetectorServer/EigerHighLevelFunctions.c @@ -36,7 +36,7 @@ int eiger_extgatingpolarity = 0; const unsigned int ndacs = 16; const char* dac_names[16] = {"SvP","Vtr","Vrf","Vrs","SvN","Vtgstv","Vcmp_ll","Vcmp_lr","cal","Vcmp_rl","rxb_rb","rxb_lb","Vcmp_rr","Vcp","Vcn","Vis"}; - +int saved_trimbits[256*256*4]; int EigerGetNumberOfExposures(){return eiger_nexposures;} @@ -54,7 +54,6 @@ int EigerGetTriggerMode(){return eiger_triggermode;} int EigerGetExternalGating(){return eiger_extgating;} int EigerGetExternalGatingPolarity(){return eiger_extgatingpolarity;} - int EigerInit(){ static int passed = 0; @@ -137,6 +136,52 @@ int EigerSetDAC(const char* iname,int v, int mV){ return EigerSendCMD(); } +int EigerSetTrimbits(const int *data){ + eiger_ret_val=0; + char tt[263681]; + tt[263680]='\0'; + int ip=0, ich=0; + int iy, ix; + int ichip; + + // convert the trimbits from int32 to chars and add border pixels. + for(iy=0;iy<256;y++) { + for (ichip=0; ichip<4; ichip++) { + for(ix=0;ix<256;ix++) { + tt[ip++]=(char)(data[ich++]&(0x3f)); + } + if (ichip<3) { + tt[ip++]=0; + tt[ip++]=0; + } + } + } + eiger_message_length = sprintf(eiger_message,"settrimbits %s", tt); + memcpy(saved_trimbits,data,256*256*4*sizeof(int)); + return EigerSendCMD(); +} + + +/* int EigerGetTrimbits(const int *data){ */ +/* eiger_ret_val=0; */ +/* char tt[263681]; */ +/* tt[263680]='\0'; */ +/* int ip=0, ich=0; */ +/* int iy, ix; */ +/* int ichip; */ + +/* eiger_message_length = sprintf(eiger_message,"settrimbits %s", tt); */ +/* memcpy(data,saved_trimbits,256*256*4*sizeof(int)); */ +/* return EigerSendCMD(); */ +/* } */ + + + + + + + + int EigerGetDAC(const char* iname){ eiger_ret_val=1; eiger_message_length = sprintf(eiger_message,"getdacvalue %s",iname); diff --git a/slsDetectorSoftware/eigerDetectorServer/FebControl.cxx b/slsDetectorSoftware/eigerDetectorServer/FebControl.cxx index 3819fcad1..6ac58cdd8 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebControl.cxx +++ b/slsDetectorSoftware/eigerDetectorServer/FebControl.cxx @@ -707,7 +707,7 @@ bool FebControl::SetTrimbits(unsigned int module_num, unsigned char *trimbits){ if(!Reset()) cout<<"Warning could not reset DAQ."<>3)<<((7-i)*4);//upper trimbits_to_load_r[offset+chip_sc] |= ( 0x7 & trimbits[263679 - (row_set*16480+super_column_start_position_r+i)])<<((7-i)*4);//low trimbits_to_load_r[offset+chip_sc+32] |= ((0x38 & trimbits[263679 - (row_set*16480+super_column_start_position_r+i)])>>3)<<((7-i)*4);//upper - } - } - } + } // end column loop i + } //end supercolumn loop sc + } //end row loop if(!WriteMemory(modules[0]->GetTopLeftAddress(),0,0,1024,trimbits_to_load_r)||!WriteMemory(modules[0]->GetTopRightAddress(),0,0,1024,trimbits_to_load_l)||!StartDAQOnlyNWaitForFinish()) return 0; - } - } + } //end row_set loop (groups of 16 rows) + } // end l_r loop memcpy(last_downloaded_trimbits,trimbits,trimbit_size*sizeof(unsigned char)); diff --git a/slsDetectorSoftware/eigerDetectorServer/doxy_eiger.config b/slsDetectorSoftware/eigerDetectorServer/doxy_eiger.config new file mode 100644 index 000000000..9f9de954a --- /dev/null +++ b/slsDetectorSoftware/eigerDetectorServer/doxy_eiger.config @@ -0,0 +1,94 @@ +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + + + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = YES + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +INTERNAL_DOCS = NO + +SHOW_INCLUDE_FILES = NO + +SHOW_FILES = NO + +SHOW_NAMESPACES = NO + +COMPACT_LATEX = YES + +PAPER_TYPE = a4 + +PDF_HYPERLINKS = YES + +USE_PDFLATEX = YES + +LATEX_HIDE_INDICES = YES + +PREDEFINED = __cplusplus + +HAVE_DOT = YES +CALL_GRAPH = YES +CALLER_GRAPH = YES + + +INPUT = Beb.h Eiger.h FebControl.h FebInterface.h gitInfoEiger.h HardwareIO.h LocalLinkInterface.h sls_detector_funcs.h slsDetectorServer_defs.h sls_receiver_defs.h xfs_types.h communication_funcs.h EigerRegisterDefs.h Feb.h FebRegisterDefs.h gitInfoEigerTmp.h HardwareMMappingDefs.h sls_detector_defs.h slsDetectorFunctionList.h slsDetectorServer_funcs.h sls_receiver_funcs.h xparameters.h Beb.cxx BebServer.cxx Eiger.cxx EigerTest.cxx FebControl.cxx Feb.cxx FebInterface.cxx FebServer.cxx HardwareIO.cxx LocalLinkInterface.cxx LocalLinkTest.cxx Test.cxx + + + + +OUTPUT_DIRECTORY = docs + diff --git a/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c b/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c index e876cc6a1..fb404469a 100644 --- a/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c @@ -288,8 +288,10 @@ int setModule(sls_detector_module myMod){ setDAC((enum detDacIndex)i,myMod.dacs[i],myMod.module,0,retval); - thisSettings = (enum detectorSettings)myMod.reg; - thisSettings = 0; + // thisSettings = (enum detectorSettings)myMod.reg; + // thisSettings = 0; + + setSettings( (enum detectorSettings)myMod.reg); // put the settings in the module register?!?!? /** set trimbits*/ if (detectorModules) copyModule(detectorModules,&myMod);