solving merging conflicts from 3.1.0 to developer

This commit is contained in:
2018-03-14 15:45:35 +01:00
129 changed files with 1120 additions and 8750 deletions

View File

@ -1,6 +1,14 @@
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
<<<<<<< HEAD
#define GITREPUUID "92b4b3324e09299663b9862bad26b38a3257dd60"
#define GITAUTH "Andrä_Marie"
#define GITREV 0x3570
#define GITDATE 0x20180119
#define GITBRANCH "developer"
=======
#define GITREPUUID "b389402d647e939342dbb2c9317c688c0eb6b105"
#define GITAUTH "Erik_Frojdh"
#define GITREV 0x3458
#define GITDATE 0x20180312
#define GITBRANCH "3.1.0-rc"
>>>>>>> 3.1.0

View File

@ -2397,13 +2397,13 @@ int slsDetector::digitalTest( digitalTestMode mode, int imod){
/* write or read register */
int slsDetector::writeRegister(int addr, int val){
uint32_t slsDetector::writeRegister(uint32_t addr, uint32_t val){
int retval=-1;
uint32_t retval = 0;
int fnum=F_WRITE_REGISTER;
int ret=FAIL;
char mess[MAX_STR_LENGTH]="";
int arg[2];
uint32_t arg[2];
arg[0]=addr;
arg[1]=val;
@ -2446,7 +2446,7 @@ int slsDetector::writeAdcRegister(int addr, int val){
int ret=FAIL;
char mess[MAX_STR_LENGTH]="";
int arg[2];
uint32_t arg[2];
arg[0]=addr;
arg[1]=val;
@ -2485,13 +2485,13 @@ int slsDetector::writeAdcRegister(int addr, int val){
int slsDetector::readRegister(int addr){
uint32_t slsDetector::readRegister(uint32_t addr){
int retval=-1;
uint32_t retval = 0;
int fnum=F_READ_REGISTER;
int ret=FAIL;
char mess[MAX_STR_LENGTH]="";
int arg;
uint32_t arg;
arg=addr;
@ -2528,25 +2528,24 @@ int slsDetector::readRegister(int addr){
}
int slsDetector::setBit(int addr, int n) {
uint32_t slsDetector::setBit(uint32_t addr, int n) {
if (n<0 || n>31) {
std::cout << "Bit number out of Range" << std:: endl;
setErrorMask((getErrorMask())|(REGISER_WRITE_READ));
}
// normal bit range
//TODO! (Erik) Check for errors! cannot use value since reg is 32bits
else {
int val = readRegister(addr);
if (val != -1) {
writeRegister(addr,val | 1<<n);
}
uint32_t val = readRegister(addr);
writeRegister(addr,val | 1<<n);
}
return readRegister(addr);
}
int slsDetector::clearBit(int addr, int n) {
uint32_t slsDetector::clearBit(uint32_t addr, int n) {
if (n<0 || n>31) {
std::cout << "Bit number out of Range" << std:: endl;
setErrorMask((getErrorMask())|(REGISER_WRITE_READ));
@ -2554,10 +2553,8 @@ int slsDetector::clearBit(int addr, int n) {
// normal bit range
else {
int val = readRegister(addr);
if (val != -1) {
writeRegister(addr,val & ~(1<<n));
}
uint32_t val = readRegister(addr);
writeRegister(addr,val & ~(1<<n));
}
return readRegister(addr);
@ -3239,7 +3236,7 @@ int slsDetector::setModule(int reg, int imod){
int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int e_eV, int* gainval, int* offsetval, int tb){
int fnum=F_SET_MODULE;
int retval;
int retval=-1;
int ret=FAIL;
char mess[MAX_STR_LENGTH]="";
@ -3345,6 +3342,9 @@ int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int
offset[i+imod*thisDetector->nOffset]=offsetval[i];
}
if (e_eV != -1)
thisDetector->currentThresholdEV = e_eV;
}
#ifdef VERBOSE
@ -3549,7 +3549,7 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti
//currently only for eiger
if (thisDetector->myDetectorType == EIGER) {
setThresholdEnergyAndSettings(e_eV,isettings,tb);
return thisDetector->currentThresholdEV;
return thisDetector->currentThresholdEV;
}
int fnum= F_SET_THRESHOLD_ENERGY;
@ -6455,9 +6455,9 @@ string slsDetector::setReceiverUDPMAC(string udpmac){
#else
;
#endif
else if(setUDPConnection()==FAIL){
/* else if(setUDPConnection()==FAIL){ commented out to be replaced by user defined udpmac
std::cout<< "Warning: UDP connection set up failed" << std::endl;
}
}*/
}else{
setErrorMask((getErrorMask())|(COULDNOT_SET_NETWORK_PARAMETER));
std::cout << "Warning: receiver udp mac address should be in xx:xx:xx:xx:xx:xx format" << std::endl;

View File

@ -892,7 +892,7 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
\returns current register value
*/
int writeRegister(int addr, int val);
uint32_t writeRegister(uint32_t addr, uint32_t val);
/**
@ -910,7 +910,7 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
\returns current register value
*/
int readRegister(int addr);
uint32_t readRegister(uint32_t addr);
/**
sets a bit in a register
@ -920,7 +920,7 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
DO NOT USE!!! ONLY EXPERT USER!!!
*/
int setBit(int addr, int n);
uint32_t setBit(uint32_t addr, int n);
/**
@ -931,7 +931,7 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
DO NOT USE!!! ONLY EXPERT USER!!!
*/
int clearBit(int addr, int n);
uint32_t clearBit(uint32_t addr, int n);
/**
set dacs value

View File

@ -1650,7 +1650,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
/* temperature control */
/*! \page settings
\section settingsadcs Temp Control
\section settingstmp Temp Control
commands to monitor and handle temperature overshoot (only JUNGFRAU)
*/
@ -5829,6 +5829,9 @@ string slsDetectorCommand::cmdSpeed(int narg, char *args[], int action) {
return string("cannot scan speed value ")+string(args[1]);
}
// -1 could work
else if (cmd=="adcphase")
t = 65536;
myDet->setOnline(ONLINE_FLAG);

View File

@ -537,7 +537,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
DO NOT USE!!! ONLY EXPERT USER!!!
*/
virtual int writeRegister(int addr, int val)=0;
virtual uint32_t writeRegister(uint32_t addr, uint32_t val)=0;
/**
@ -548,7 +548,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
DO NOT USE!!! ONLY EXPERT USER!!!
*/
virtual int writeAdcRegister(int addr, int val)=0;
virtual int writeAdcRegister(int addr, int val)=0;
/**
@ -558,7 +558,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
DO NOT USE!!! ONLY EXPERT USER!!!
*/
virtual int readRegister(int addr)=0;
virtual uint32_t readRegister(uint32_t addr)=0;
/**
@ -569,7 +569,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
DO NOT USE!!! ONLY EXPERT USER!!!
*/
virtual int setBit(int addr, int n)=0;
virtual uint32_t setBit(uint32_t addr, int n)=0;
/**
@ -580,7 +580,7 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
DO NOT USE!!! ONLY EXPERT USER!!!
*/
virtual int clearBit(int addr, int n)=0;
virtual uint32_t clearBit(uint32_t addr, int n)=0;
/**