mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-09 11:30:43 +02:00
changed jungfrau temperature conversion but binary to follow
This commit is contained in:
parent
da4ffb235c
commit
b4309a9f60
@ -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: 5d22df1c472895035fdb21ec1104e749aaa41167
|
Repsitory UUID: 788060fd5a954e42fea270b25b8a398293013e96
|
||||||
Revision: 1431
|
Revision: 1432
|
||||||
Branch: developer
|
Branch: developer
|
||||||
Last Changed Author: Dhanya_Maliakal
|
Last Changed Author: Dhanya_Maliakal
|
||||||
Last Changed Rev: 1436
|
Last Changed Rev: 1437
|
||||||
Last Changed Date: 2017-06-29 17:10:10 +0200
|
Last Changed Date: 2017-07-03 13:32:10 +0200
|
||||||
|
@ -838,34 +838,11 @@ void setDAC(enum DACINDEX ind, int val, int imod, int mV, int retval[]){
|
|||||||
|
|
||||||
|
|
||||||
int getADC(enum ADCINDEX ind, int imod){
|
int getADC(enum ADCINDEX ind, int imod){
|
||||||
|
|
||||||
char tempnames[2][40]={"VRs/FPGAs Temperature", "ADCs/ASICs Temperature"};
|
char tempnames[2][40]={"VRs/FPGAs Temperature", "ADCs/ASICs Temperature"};
|
||||||
printf("Getting Temperature for %s\n",tempnames[ind]);
|
printf("Getting Temperature for %s\n",tempnames[ind]);
|
||||||
u_int32_t addr = GET_TEMPERATURE_TMP112_REG;
|
u_int32_t addr = GET_TEMPERATURE_TMP112_REG;
|
||||||
int retval = -1;
|
int retval = bus_r(addr)/10;
|
||||||
/*
|
printf("\nReal Temperature %s: %f °C\n",tempnames[ind],(double)retval/1000.00);
|
||||||
u_int32_t val = 0;
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for(i = 0; i < 10; i++) {
|
|
||||||
switch((int)ind){
|
|
||||||
|
|
||||||
case TEMP_FPGA:
|
|
||||||
val = (val<<1) + ((bus_r(addr) & (2)) >> 1);
|
|
||||||
break;
|
|
||||||
case TEMP_ADC:
|
|
||||||
val= (val<<1) + (bus_r(addr) & (1));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// or just read it
|
|
||||||
retval = ((int)val) / 4.0;
|
|
||||||
|
|
||||||
printf("Temperature %s: %d °C\n",tempnames[ind],retval);*/
|
|
||||||
printf("\nReal Temperature %s: %d °C\n",tempnames[ind],bus_r(addr));
|
|
||||||
|
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -929,7 +929,7 @@ class multiSlsDetector : public slsDetectorUtils {
|
|||||||
\param val value (in V)
|
\param val value (in V)
|
||||||
\param index DAC index
|
\param index DAC index
|
||||||
\param imod module number (if -1 alla modules)
|
\param imod module number (if -1 alla modules)
|
||||||
\returns current DAC value
|
\returns current DAC value (temperature for eiger and jungfrau in millidegrees)
|
||||||
*/
|
*/
|
||||||
dacs_t getADC(dacIndex index, int imod=-1);
|
dacs_t getADC(dacIndex index, int imod=-1);
|
||||||
/**
|
/**
|
||||||
|
@ -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 "5d22df1c472895035fdb21ec1104e749aaa41167"
|
#define SVNREPUUIDLIB "788060fd5a954e42fea270b25b8a398293013e96"
|
||||||
//#define SVNREV 0x1436
|
//#define SVNREV 0x1437
|
||||||
//#define SVNKIND ""
|
//#define SVNKIND ""
|
||||||
//#define SVNSCHED ""
|
//#define SVNSCHED ""
|
||||||
#define SVNAUTHLIB "Dhanya_Maliakal"
|
#define SVNAUTHLIB "Dhanya_Maliakal"
|
||||||
#define SVNREVLIB 0x1436
|
#define SVNREVLIB 0x1437
|
||||||
#define SVNDATELIB 0x20170629
|
#define SVNDATELIB 0x20170703
|
||||||
//
|
//
|
||||||
|
@ -886,7 +886,7 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
|
|||||||
set dacs value
|
set dacs value
|
||||||
\param index ADC index
|
\param index ADC index
|
||||||
\param imod module number
|
\param imod module number
|
||||||
\returns current ADC value
|
\returns current ADC value (temperature for eiger and jungfrau in millidegrees)
|
||||||
*/
|
*/
|
||||||
dacs_t getADC(dacIndex index, int imod=0);
|
dacs_t getADC(dacIndex index, int imod=0);
|
||||||
|
|
||||||
|
@ -4204,7 +4204,7 @@ string slsDetectorCommand::cmdADC(int narg, char *args[], int action) {
|
|||||||
|
|
||||||
myDet->setOnline(ONLINE_FLAG);
|
myDet->setOnline(ONLINE_FLAG);
|
||||||
#ifdef DACS_INT
|
#ifdef DACS_INT
|
||||||
if (myDet->getDetectorsType() == EIGER)
|
if (myDet->getDetectorsType() == EIGER || myDet->getDetectorsType() == JUNGFRAU)
|
||||||
sprintf(answer,"%.2f",(double)myDet->getADC(adc)/1000.00);
|
sprintf(answer,"%.2f",(double)myDet->getADC(adc)/1000.00);
|
||||||
else sprintf(answer,"%d",myDet->getADC(adc));
|
else sprintf(answer,"%d",myDet->getADC(adc));
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user