mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-07 10:30:41 +02:00
wip done
This commit is contained in:
parent
3f08d6699c
commit
c0312c9bb6
@ -1041,24 +1041,24 @@ void validateSettings() {
|
||||
// if any special dac value is changed individually => undefined
|
||||
const int specialDacs[NSPECIALDACS] = SPECIALDACINDEX;
|
||||
int *specialDacValues[] = {defaultDacValue_G0, defaultDacValue_HG0};
|
||||
int settList[NUMSETTINGS] = {DYNAMICGAIN, DYNAMICHG0};
|
||||
enum detectorSettings sett = UNDEFINED;
|
||||
for (int isett = 0; isett != NUMSETTINGS; ++isett) {
|
||||
int settList[] = {DYNAMICGAIN, DYNAMICHG0};
|
||||
enum detectorSettings sett = UNDEFINED;
|
||||
for (int isett = 0; isett != NUMSETTINGS; ++isett) {
|
||||
|
||||
// assume it matches current setting in list
|
||||
sett = settList[isett];
|
||||
// if one value does not match, = undefined
|
||||
for (int i = 0; i < NSPECIALDACS; ++i) {
|
||||
if (getDAC(specialDacs[i], 0) != specialDacValues[isett][i]) {
|
||||
sett = UNDEFINED;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// assume it matches current setting in list
|
||||
sett = settList[isett];
|
||||
// if one value does not match, = undefined
|
||||
for (int i = 0; i < NSPECIALDACS; ++i) {
|
||||
if (getDAC(specialDacs[i], 0) != specialDacValues[isett][i]) {
|
||||
sett = UNDEFINED;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// all values matchd a setting
|
||||
if (sett != UNDEFINED) {
|
||||
break;
|
||||
}
|
||||
// all values matchd a setting
|
||||
if (sett != UNDEFINED) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// update settings
|
||||
if (thisSettings != sett) {
|
||||
|
@ -1368,7 +1368,7 @@ void validateSettings() {
|
||||
const int specialDacs[NSPECIALDACS] = SPECIALDACINDEX;
|
||||
int *specialDacValues[] = {defaultDacValue_standard, defaultDacValue_fast,
|
||||
defaultDacValue_highgain};
|
||||
int settList[NUMSETTINGS] = {STANDARD, FAST, HIGHGAIN};
|
||||
int settList[] = {STANDARD, FAST, HIGHGAIN};
|
||||
|
||||
enum detectorSettings sett = UNDEFINED;
|
||||
for (int isett = 0; isett != NUMSETTINGS; ++isett) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user