ctb, moench: implemented led enable feature

This commit is contained in:
2019-03-01 09:00:04 +01:00
parent ebee9e308e
commit bb81613900
13 changed files with 120 additions and 22 deletions

View File

@ -5084,6 +5084,30 @@ uint64_t slsDetector::setCTBPatWaitTime(uint64_t level, uint64_t t) {
return retval;
}
int slsDetector::setLEDEnable(int enable) {
int fnum = F_LED;
int ret = FAIL;
int arg = enable;
int retval = -1;
FILE_LOG(logDEBUG1) << "Sending LED Enable: " << arg;
if (thisDetector->receiverOnlineFlag == ONLINE_FLAG) {
auto client = sls::ClientSocket(false, thisDetector->hostname, thisDetector->controlPort);
ret = client.sendCommandThenRead(fnum, &arg, sizeof(arg), &retval, sizeof(retval));
// handle ret
if (ret == FAIL) {
setErrorMask((getErrorMask()) | (OTHER_ERROR_CODE));
} else {
FILE_LOG(logDEBUG1) << "LED Enable: " << retval;
}
}
if (ret == FORCE_UPDATE) {
ret = updateDetector();
}
return retval;
}
slsDetectorDefs::sls_detector_module *slsDetector::interpolateTrim(
sls_detector_module *a, sls_detector_module *b,
const int energy, const int e1, const int e2, int tb) {