mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
default dacs done
This commit is contained in:
@ -515,6 +515,31 @@ int setDefaultDacs() {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int getDefaultDac(enum DACINDEX index, enum detectorSettings sett,
|
||||
int *retval) {
|
||||
if (sett != UNDEFINED) {
|
||||
return FAIL;
|
||||
}
|
||||
if (index < 0 || index >= NDAC)
|
||||
return FAIL;
|
||||
*retval = defaultDacValues[index];
|
||||
return OK;
|
||||
}
|
||||
|
||||
int setDefaultDac(enum DACINDEX index, enum detectorSettings sett, int value) {
|
||||
if (sett != UNDEFINED) {
|
||||
return FAIL;
|
||||
}
|
||||
if (index < 0 || index >= NDAC)
|
||||
return FAIL;
|
||||
|
||||
char *dac_names[] = {DAC_NAMES};
|
||||
LOG(logINFO, ("Setting Default Dac [%d - %s]: %d\n", (int)index,
|
||||
dac_names[index], value));
|
||||
defaultDacValues[index] = value;
|
||||
return OK;
|
||||
}
|
||||
|
||||
int readConfigFile() {
|
||||
|
||||
if (initError == FAIL) {
|
||||
|
Reference in New Issue
Block a user