mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-21 14:04:13 +01:00
gotthard:highvoltage done
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@57 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@@ -587,6 +587,7 @@ float initDACbyIndexDACU(int ind, int val, int imod) {
|
||||
|
||||
if (setDACRegister(ind, -1, im)!=setDACRegister(ind, -1, 0)) {
|
||||
#ifdef VERBOSE
|
||||
|
||||
printf("mod %d returning -1\n",im);
|
||||
#endif
|
||||
return -1;
|
||||
@@ -727,7 +728,6 @@ float getDACbyIndexDACU(int ind, int imod) {
|
||||
}
|
||||
|
||||
|
||||
//changed arguments by dhanya
|
||||
int initDAC(int dac_addr, int value, int imod) {
|
||||
int i;
|
||||
#ifdef VERBOSE
|
||||
@@ -741,6 +741,43 @@ int initDAC(int dac_addr, int value, int imod) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
float getTemperatureByModule(int tempSensor, int imod)
|
||||
{
|
||||
int im;
|
||||
//for the particular module
|
||||
if (imod>=0 && imod<nModX) {
|
||||
return getTemperature(tempSensor,imod);
|
||||
}
|
||||
else{
|
||||
//checks if all modules have the same value(ALLMOD)
|
||||
for (im=1; im<nModX; im++) {
|
||||
if (getTemperature(tempSensor,im)!=getTemperature(tempSensor,0)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return getTemperature(tempSensor,0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int getHighVoltageByModule(int val, int imod)
|
||||
{
|
||||
int im;
|
||||
//for the particular module
|
||||
if (imod>=0 && imod<nModX) {
|
||||
return getHighVoltage(val,imod);
|
||||
}
|
||||
else{
|
||||
//checks if all modules have the same value(ALLMOD)
|
||||
for (im=1; im<nModX; im++) {
|
||||
if (getHighVoltage(val,im)!=getHighVoltage(val,0)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return getHighVoltage(val,0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void showbits(int h)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user