mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 01:58:00 +02:00
fix
This commit is contained in:
@ -49,6 +49,7 @@ int highvoltage = 0;
|
||||
int dacValues[NDAC] = {};
|
||||
int onChipdacValues[ONCHIP_NDAC][NCHIP] = {};
|
||||
int defaultDacValues[NDAC] = {};
|
||||
int hardCodedDefaultDacValues[NDAC] = {};
|
||||
int defaultOnChipdacValues[ONCHIP_NDAC][NCHIP] = {};
|
||||
int injectedChannelsOffset = 0;
|
||||
int injectedChannelsIncrement = 0;
|
||||
@ -393,6 +394,7 @@ void setupDetector() {
|
||||
memset(dacValues, 0, sizeof(dacValues));
|
||||
for (int i = 0; i < NDAC; ++i) {
|
||||
defaultDacValues[i] = -1;
|
||||
hardCodedDefaultDacValues[i] = -1;
|
||||
}
|
||||
for (int i = 0; i < ONCHIP_NDAC; ++i) {
|
||||
for (int j = 0; j < NCHIP; ++j) {
|
||||
@ -484,9 +486,8 @@ void setupDetector() {
|
||||
int resetToDefaultDacs(int hardReset) {
|
||||
// reset defaults to hardcoded defaults
|
||||
if (hardReset) {
|
||||
const int vals[] = DEFAULT_DAC_VALS;
|
||||
for (int i = 0; i < NDAC; ++i) {
|
||||
defaultDacValues[i] = vals[i];
|
||||
defaultDacValues[i] = hardCodedDefaultDacValues[i];
|
||||
}
|
||||
}
|
||||
// reset dacs to defaults
|
||||
@ -839,6 +840,7 @@ int readConfigFile() {
|
||||
|
||||
// set default dac variables
|
||||
defaultDacValues[idac] = value;
|
||||
hardCodedDefaultDacValues[idac] = value;
|
||||
|
||||
// set dac
|
||||
setDAC(idac, value, 0);
|
||||
|
Reference in New Issue
Block a user