mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-25 07:40:03 +02:00
Merge branch '2.3-rc' into hdf5
This commit is contained in:
commit
549e346ad4
Binary file not shown.
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware/eigerDetectorServer
|
||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git/eigerDetectorServer
|
||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||
Repsitory UUID: 230d6b36e9852214f4ba5ae7c92647f35000b24d
|
||||
Revision: 263
|
||||
Branch: developer
|
||||
Repsitory UUID: 44df2b221f9f06f7d4361ed0291e026ecbefcab2
|
||||
Revision: 270
|
||||
Branch: 2.3-rc
|
||||
Last Changed Author: Dhanya_Maliakal
|
||||
Last Changed Rev: 1313
|
||||
Last Changed Date: 2016-11-30 10:36:34 +0100
|
||||
Last Changed Rev: 1326
|
||||
Last Changed Date: 2017-02-10 11:51:05 +0100
|
||||
|
@ -1,11 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git/eigerDetectorServer"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "230d6b36e9852214f4ba5ae7c92647f35000b24d"
|
||||
//#define SVNREV 0x1313
|
||||
#define SVNREPUUID "44df2b221f9f06f7d4361ed0291e026ecbefcab2"
|
||||
//#define SVNREV 0x1326
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "Dhanya_Maliakal"
|
||||
#define SVNREV 0x1313
|
||||
#define SVNDATE 0x20161130
|
||||
#define SVNREV 0x1326
|
||||
#define SVNDATE 0x20170210
|
||||
//
|
||||
|
@ -601,6 +601,7 @@ int64_t getCurrentTau(){
|
||||
|
||||
void setDefaultSettingsTau_in_nsec(int t){
|
||||
default_tau_from_file = t;
|
||||
printf("Default tau set to %d\n",default_tau_from_file);
|
||||
}
|
||||
|
||||
int setModule(sls_detector_module myMod, int delay){
|
||||
@ -708,6 +709,7 @@ enum detectorSettings setSettings(enum detectorSettings sett, int imod){
|
||||
return thisSettings;
|
||||
}if(sett != GET_SETTINGS)
|
||||
thisSettings = sett;
|
||||
printf(" Settings: %d\n", thisSettings);
|
||||
return thisSettings;
|
||||
}
|
||||
|
||||
@ -1267,9 +1269,12 @@ enum synchronizationMode setSynchronization(enum synchronizationMode arg){
|
||||
return NO_SYNCHRONIZATION;
|
||||
}
|
||||
|
||||
void setAllTrimbits(int val){
|
||||
int setAllTrimbits(int val){
|
||||
int ichan;
|
||||
if(Feb_Control_SaveAllTrimbitsTo(val)){
|
||||
if(!Feb_Control_SaveAllTrimbitsTo(val)){
|
||||
cprintf(RED,"error in setting all trimbits to value\n");
|
||||
return FAIL;
|
||||
}else{
|
||||
#ifdef VERBOSE
|
||||
printf("Copying register %x value %d\n",destMod->reg,val);
|
||||
#endif
|
||||
@ -1278,7 +1283,8 @@ void setAllTrimbits(int val){
|
||||
*((detectorModules->chanregs)+ichan)=val;
|
||||
}
|
||||
}
|
||||
}else printf("error in setting all trimbits to value\n");
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
int getAllTrimbits(){
|
||||
|
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware
|
||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||
Repsitory UUID: 230d6b36e9852214f4ba5ae7c92647f35000b24d
|
||||
Revision: 1313
|
||||
Branch: developer
|
||||
Repsitory UUID: 44df2b221f9f06f7d4361ed0291e026ecbefcab2
|
||||
Revision: 1326
|
||||
Branch: 2.3-rc
|
||||
Last Changed Author: Dhanya_Maliakal
|
||||
Last Changed Rev: 1313
|
||||
Last Changed Date: 2016-11-30 10:36:34 +0100
|
||||
Last Changed Rev: 1326
|
||||
Last Changed Date: 2017-02-10 11:51:05 +0100
|
||||
|
@ -1,11 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUIDLIB "230d6b36e9852214f4ba5ae7c92647f35000b24d"
|
||||
//#define SVNREV 0x1313
|
||||
#define SVNREPUUIDLIB "44df2b221f9f06f7d4361ed0291e026ecbefcab2"
|
||||
//#define SVNREV 0x1326
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTHLIB "Dhanya_Maliakal"
|
||||
#define SVNREVLIB 0x1313
|
||||
#define SVNDATELIB 0x20161130
|
||||
#define SVNREVLIB 0x1326
|
||||
#define SVNDATELIB 0x20170210
|
||||
//
|
||||
|
@ -148,7 +148,7 @@ enum synchronizationMode setSynchronization(enum synchronizationMode arg);
|
||||
#ifdef EIGERD
|
||||
int startReceiver(int d);
|
||||
void setExternalGating(int enable[]);
|
||||
void setAllTrimbits(int val);
|
||||
int setAllTrimbits(int val);
|
||||
int getAllTrimbits();
|
||||
int getBebFPGATemp();
|
||||
int activate(int enable);
|
||||
|
@ -1246,8 +1246,25 @@ int set_dac(int file_des) {
|
||||
retval[0] = setHighVoltage(val,imod);
|
||||
else if(ind == IO_DELAY)
|
||||
retval[0] = setIODelay(val,imod);
|
||||
else
|
||||
else{
|
||||
setDAC(idac,val,imod,mV,retval);
|
||||
if(val != -1) {
|
||||
//changing dac changes settings to undefined
|
||||
switch(idac){
|
||||
case VCMP_LL:
|
||||
case VCMP_LR:
|
||||
case VCMP_RL:
|
||||
case VCMP_RR:
|
||||
case VRF:
|
||||
case VCP:
|
||||
setSettings(UNDEFINED,-1);
|
||||
cprintf(RED,"Settings has been changed to undefined (changed specific dacs)\n");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1953,11 +1970,16 @@ int set_module(int file_des) {
|
||||
sprintf(mess,"Detector locked by %s\n",lastClientIP);
|
||||
} else {
|
||||
#ifdef EIGERD
|
||||
//set threshhold
|
||||
if (myEV >= 0) setThresholdEnergy(myEV,-1);
|
||||
//set dacs, trimbits and iodelay
|
||||
ret=setModule(myModule, myIODelay);
|
||||
|
||||
//set threshhold
|
||||
if (myEV >= 0)
|
||||
setThresholdEnergy(myEV,-1);
|
||||
else {
|
||||
//changes settings to undefined (loading a random trim file)
|
||||
setSettings(UNDEFINED,-1);
|
||||
cprintf(RED,"Settings has been changed to undefined (random trim file)\n");
|
||||
}
|
||||
//rate correction
|
||||
//switch off rate correction: no value read from load calib/load settings)
|
||||
if(myTau == -1){
|
||||
@ -1970,11 +1992,14 @@ int set_module(int file_des) {
|
||||
}
|
||||
|
||||
//normal tau value (only if enabled)
|
||||
else if (getRateCorrectionEnable()){
|
||||
int64_t retvalTau = setRateCorrection(myTau);
|
||||
if(myTau != retvalTau){
|
||||
cprintf(RED,"%s",mess);
|
||||
ret=FAIL;
|
||||
else{
|
||||
setDefaultSettingsTau_in_nsec(myTau);
|
||||
if (getRateCorrectionEnable()){
|
||||
int64_t retvalTau = setRateCorrection(myTau);
|
||||
if(myTau != retvalTau){
|
||||
cprintf(RED,"%s",mess);
|
||||
ret=FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3694,8 +3719,12 @@ int set_all_trimbits(int file_des){
|
||||
ret = FAIL;
|
||||
strcpy(mess,"Cant set trimbits to this value\n");
|
||||
}else {
|
||||
if(arg >= 0)
|
||||
setAllTrimbits(arg);
|
||||
if(arg >= 0){
|
||||
ret = setAllTrimbits(arg);
|
||||
//changes settings to undefined
|
||||
setSettings(UNDEFINED,-1);
|
||||
cprintf(RED,"Settings has been changed to undefined (change all trimbits)\n");
|
||||
}
|
||||
retval = getAllTrimbits();
|
||||
}
|
||||
}
|
||||
@ -3946,33 +3975,28 @@ int set_rate_correct(int file_des) {
|
||||
ret=FAIL;
|
||||
sprintf(mess,"Detector locked by %s\n",lastClientIP);
|
||||
} else {
|
||||
|
||||
//still negative (not set)
|
||||
if(tau_ns < 0){
|
||||
ret = FAIL;
|
||||
if(getRateCorrectionEnable()){
|
||||
setRateCorrection(0);
|
||||
strcpy(mess,"Cannot set rate correction as tau must be >=0. Switching off Rate Correction\n");
|
||||
cprintf(RED,"%s",mess);
|
||||
}
|
||||
}
|
||||
|
||||
//set rate
|
||||
//wrong bit mode
|
||||
if((setDynamicRange(-1)!=32) && (setDynamicRange(-1)!=16) && (tau_ns!=0)){
|
||||
strcpy(mess,"Rate correction Deactivated, must be in 32 or 16 bit mode\n");
|
||||
cprintf(RED,"%s",mess);
|
||||
ret=FAIL;
|
||||
}
|
||||
//16 or 32 bit mode
|
||||
else{
|
||||
//not 32 or 16 bit mode
|
||||
if((setDynamicRange(-1)!=32) && (setDynamicRange(-1)!=16) && (tau_ns!=0)){
|
||||
strcpy(mess,"Rate correction Deactivated, must be in 32 or 16 bit mode\n");
|
||||
if(tau_ns < 0)
|
||||
tau_ns = getDefaultSettingsTau_in_nsec();
|
||||
else if(tau_ns > 0){
|
||||
//changing tau to a user defined value changes settings to undefined
|
||||
setSettings(UNDEFINED,-1);
|
||||
cprintf(RED,"Settings has been changed to undefined (tau changed)\n");
|
||||
}
|
||||
|
||||
int64_t retval = setRateCorrection(tau_ns);
|
||||
if(tau_ns != retval){
|
||||
cprintf(RED,"%s",mess);
|
||||
ret=FAIL;
|
||||
}
|
||||
//32 bit mode
|
||||
else{
|
||||
int64_t retval = setRateCorrection(tau_ns);
|
||||
if(tau_ns != retval){
|
||||
cprintf(RED,"%s",mess);
|
||||
ret=FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user