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