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