This commit is contained in:
2020-07-17 17:33:43 +02:00
parent 546bef5e5a
commit b7cb341ee3
15 changed files with 212 additions and 176 deletions

View File

@ -449,11 +449,7 @@ class Mythen3Data : public GeneralData {
ncounters = n;
nPixelsX = NCHAN * ncounters;
LOG(logINFO) << "nPixelsX: " << nPixelsX;
imageSize = nPixelsX * nPixelsY *
((dr > 16) ? 4 : // 32 bit
((dr > 8) ? 2 : // 16 bit
((dr > 4) ? 0.5 : // 4 bit
0.125))); // 1 bit
imageSize = nPixelsX * nPixelsY * ((double)dr / 8.00);
dataSize = imageSize / packetsPerFrame;
packetSize = headerSizeinPacket + dataSize;
LOG(logINFO) << "PacketSize: " << packetSize;
@ -465,11 +461,7 @@ class Mythen3Data : public GeneralData {
* @param tgEnable (discarded, of no value to mythen3)
*/
void SetDynamicRange(int dr, bool tgEnable) {
imageSize = nPixelsX * nPixelsY *
((dr > 16) ? 4 : // 32 bit
((dr > 8) ? 2 : // 16 bit
((dr > 4) ? 0.5 : // 4 bit
0.125))); // 1 bit
imageSize = nPixelsX * nPixelsY * ((double)dr / 8.00);
dataSize = imageSize / packetsPerFrame;
packetSize = headerSizeinPacket + dataSize;
LOG(logINFO) << "PacketSize: " << packetSize;