mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-04 00:50:42 +02:00
updated update_image_size in xilinx
This commit is contained in:
parent
3297707ab7
commit
4d8bdae836
@ -60,8 +60,8 @@ class GeneralData {
|
||||
slsDetectorDefs::frameDiscardPolicy frameDiscardMode{
|
||||
slsDetectorDefs::NO_DISCARD};
|
||||
|
||||
GeneralData(){};
|
||||
virtual ~GeneralData(){};
|
||||
GeneralData() {};
|
||||
virtual ~GeneralData() {};
|
||||
|
||||
// Returns the pixel depth in byte, 4 bits being 0.5 byte
|
||||
float GetPixelDepth() { return float(dynamicRange) / 8; }
|
||||
@ -569,6 +569,7 @@ class XilinxChipTestBoardData : public GeneralData {
|
||||
nDigitalBytes = 0;
|
||||
nTransceiverBytes = 0;
|
||||
int nAnalogChans = 0, nDigitalChans = 0, nTransceiverChans = 0;
|
||||
uint64_t digital_bytes_reserved = 0;
|
||||
|
||||
// analog channels (normal, analog/digital readout)
|
||||
if (readoutType == slsDetectorDefs::ANALOG_ONLY ||
|
||||
@ -586,7 +587,11 @@ class XilinxChipTestBoardData : public GeneralData {
|
||||
readoutType == slsDetectorDefs::ANALOG_AND_DIGITAL ||
|
||||
readoutType == slsDetectorDefs::DIGITAL_AND_TRANSCEIVER) {
|
||||
nDigitalChans = NCHAN_DIGITAL;
|
||||
nDigitalBytes = (sizeof(uint64_t) * nDigitalSamples);
|
||||
uint32_t num_bytes_per_bit = (nDigitalSamples % 8 == 0)
|
||||
? nDigitalSamples / 8
|
||||
: nDigitalSamples / 8 + 1;
|
||||
digital_bytes_reserved = 64 * num_bytes_per_bit;
|
||||
nDigitalBytes = sizeof(uint64_t) * nDigitalSamples;
|
||||
LOG(logDEBUG1) << "Number of Digital Channels:" << nDigitalChans
|
||||
<< " Databytes: " << nDigitalBytes;
|
||||
}
|
||||
@ -604,7 +609,7 @@ class XilinxChipTestBoardData : public GeneralData {
|
||||
}
|
||||
nPixelsX = nAnalogChans + nDigitalChans + nTransceiverChans;
|
||||
|
||||
imageSize = nAnalogBytes + nDigitalBytes + nTransceiverBytes;
|
||||
imageSize = nAnalogBytes + digital_bytes_reserved + nTransceiverBytes;
|
||||
packetsPerFrame = ceil((double)imageSize / (double)dataSize);
|
||||
|
||||
LOG(logDEBUG1) << "Total Number of Channels:" << nPixelsX
|
||||
|
Loading…
x
Reference in New Issue
Block a user