ctb client updated

This commit is contained in:
maliakal_d 2019-02-06 17:45:19 +01:00
parent a76cc90972
commit 3f43767d38
2 changed files with 12 additions and 9 deletions

View File

@ -2132,6 +2132,16 @@ int send_update(int file_des) {
n = sendData(file_des,&i64,sizeof(i64),INT64); n = sendData(file_des,&i64,sizeof(i64),INT64);
if (n < 0) return printSocketReadError(); if (n < 0) return printSocketReadError();
#ifdef CHIPTESTBOARDD
i64 = setTimer(SAMPLES,GET_FLAG);
n = sendData(file_des,&i64,sizeof(i64),INT64);
if (n < 0) return printSocketReadError();
i32 = setReadOutFlags(GET_READOUT_FLAGS);
n = sendData(file_des,&i32,sizeof(i32),INT32);
if (n < 0) return printSocketReadError();
#endif
if (lockStatus == 0) { if (lockStatus == 0) {
strcpy(lastClientIP,thisClientIP); strcpy(lastClientIP,thisClientIP);
} }

View File

@ -1848,18 +1848,11 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t) {
} }
} }
// setting timers consequences (eiger (ratecorr) and jctb (databytes)) // setting timers consequences (eiger (ratecorr) )
// (a get can also change timer value, hence check difference) // (a get can also change timer value, hence check difference)
if (oldtimer != thisDetector->timerValue[index]) { if (oldtimer != thisDetector->timerValue[index]) {
// jctb: change samples, change databytes
if (thisDetector->myDetectorType == CHIPTESTBOARD) {
if (index == SAMPLES) {
setDynamicRange();
FILE_LOG(logINFO) << "Changing samples: data size = " << thisDetector->dataBytes;
}
}
// eiger: change exptime/subexptime, set rate correction to update table // eiger: change exptime/subexptime, set rate correction to update table
else if (thisDetector->myDetectorType == EIGER) { if (thisDetector->myDetectorType == EIGER) {
int dr = thisDetector->dynamicRange; int dr = thisDetector->dynamicRange;
if ((dr == 32 && index == SUBFRAME_ACQUISITION_TIME) || if ((dr == 32 && index == SUBFRAME_ACQUISITION_TIME) ||
(dr == 16 && index == ACQUISITION_TIME)) { (dr == 16 && index == ACQUISITION_TIME)) {