get/set timing, generate data for gotthard2, vref_rstore instead of restore for gotthard2

This commit is contained in:
2020-01-22 18:18:56 +01:00
parent 8cbf3c62a9
commit f881133795
24 changed files with 136 additions and 126 deletions

View File

@ -1383,13 +1383,7 @@ void* start_timer(void* arg) {
getNumTriggers() );
int64_t exp_ns = getExpTime();
int numCounters = __builtin_popcount(getCounterMask());
int dr = setDynamicRange(-1);
int imagesize = NCHAN_1_COUNTER * NCHIP * numCounters *
((dr > 16) ? 4 : // 32 bit
((dr > 8) ? 2 : // 16 bit
((dr > 4) ? 0.5 : // 4 bit
0.125))); // 1 bit
int imagesize = calculateDataBytes();
int datasize = imagesize / PACKETS_PER_FRAME;
int packetsize = datasize + sizeof(sls_detector_header);
@ -1568,7 +1562,15 @@ u_int32_t runBusy() {
/* common */
int calculateDataBytes() {
return 0;
int numCounters = __builtin_popcount(getCounterMask());
int dr = setDynamicRange(-1);
int databytes = NCHAN_1_COUNTER * NCHIP * numCounters *
((dr > 16) ? 4 : // 32 bit
((dr > 8) ? 2 : // 16 bit
((dr > 4) ? 0.5 : // 4 bit
0.125))); // 1 bit
return databytes;
}
int getTotalNumberOfChannels() {return (getNumberOfChannelsPerChip() * getNumberOfChips());}