mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-21 00:58:01 +02:00
ctb, moench: implemented led enable feature
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user