From 4eba07ca907b7efd0c2d915a355ae863fe9f9ef7 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 17 Feb 2016 18:01:58 +0100 Subject: [PATCH] added error message tau/subexptime to error list --- slsDetectorSoftware/commonFiles/error_defs.h | 7 +++++++ slsDetectorSoftware/eigerDetectorServer/FebControl.c | 1 - slsDetectorSoftware/slsDetector/slsDetector.cpp | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/slsDetectorSoftware/commonFiles/error_defs.h b/slsDetectorSoftware/commonFiles/error_defs.h index c7f2b01b3..2ad16c404 100644 --- a/slsDetectorSoftware/commonFiles/error_defs.h +++ b/slsDetectorSoftware/commonFiles/error_defs.h @@ -57,6 +57,7 @@ using namespace std; #define COULD_NOT_PULSE_PIXEL_NMOVE 0x0000000000080000ULL #define COULD_NOT_PULSE_CHIP 0x0000000000100000ULL #define COULD_NOT_SET_RATE_CORRECTION 0x0000000000200000ULL +#define RATE_CORRECTION_TAU_SUBEXPOSURE 0x0000000000400000ULL // 0x00000000FFFFFFFFULL /** @short class returning all error messages for error mask */ @@ -181,6 +182,12 @@ public: if(slsErrorMask&COULD_NOT_SET_RATE_CORRECTION) retval.append("Could not set rate correction\n"); + if(slsErrorMask&RATE_CORRECTION_TAU_SUBEXPOSURE) + retval.append("Rate Correction Deactivated: (tau/subexptime) must be less than 0.0015\n"); + + + //------------------------------------------------------ length of message + return retval; diff --git a/slsDetectorSoftware/eigerDetectorServer/FebControl.c b/slsDetectorSoftware/eigerDetectorServer/FebControl.c index 851eb5e5d..54ea06559 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebControl.c +++ b/slsDetectorSoftware/eigerDetectorServer/FebControl.c @@ -1926,7 +1926,6 @@ int Feb_Control_SetRateCorrectionTable(unsigned int *table){ return 0; } } -cprintf(BLUE, "done with writing to memory\n"); return 1; } diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 85005f155..310bca9f0 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -2773,6 +2773,8 @@ int slsDetector::setModule(sls_detector_module module, int* gainval, int* offset if(ret == FAIL && thisDetector->myDetectorType == EIGER && strcasestr(mess,"Rate")){ setErrorMask((getErrorMask())|(COULD_NOT_SET_RATE_CORRECTION)); + if(strcasestr(mess,"tau/subexptime")) + setErrorMask((getErrorMask())|(RATE_CORRECTION_TAU_SUBEXPOSURE)); thisDetector->correctionMask&=~(1<tDead = 0; } @@ -5033,6 +5035,8 @@ int slsDetector::setRateCorrection(double t){ controlSocket->ReceiveDataOnly(mess,sizeof(mess)); std::cout<< "Detector returned error: " << mess << std::endl; setErrorMask((getErrorMask())|(COULD_NOT_SET_RATE_CORRECTION)); + if(strcasestr(mess,"tau/subexptime")) + setErrorMask((getErrorMask())|(RATE_CORRECTION_TAU_SUBEXPOSURE)); thisDetector->correctionMask&=~(1<tDead = 0; }