bugfix from earlier commit: dr in readfromreceiver commented out

This commit is contained in:
maliakal_d 2020-02-24 10:36:52 +01:00
parent 247d40f5a6
commit f4b922165f

View File

@ -486,19 +486,16 @@ void DetectorImpl::readFrameFromReceiver() {
if (image == nullptr) {
// allocate
size = doc["size"].GetUint();
//std::cout << "SIZE: "<< size << std::endl;
multisize = size * zmqSocket.size();
image = new char[size];
multiframe = new char[multisize];
memset(multiframe, 0xFF, multisize);
// dynamic range
// dynamicRange = doc["bitmode"].GetUint();
dynamicRange = doc["bitmode"].GetUint();
bytesPerPixel = (float)dynamicRange / 8;
// std::cout << "DR: "<< dynamicRange << std::endl;
// shape
nPixelsX = doc["shape"][0].GetUint();
nPixelsY = doc["shape"][1].GetUint();
// std::cout << "shape: "<< nPixelsX << " "<< nPixelsY << std::endl;
// detector shape
nX = doc["detshape"][0].GetUint();
nY = doc["detshape"][1].GetUint();
@ -562,11 +559,9 @@ void DetectorImpl::readFrameFromReceiver() {
uint32_t rowoffset = nX * singledetrowoffset;
if (multi_shm()->multiDetectorType == CHIPTESTBOARD) {
singledetrowoffset = size;
nPixelsY=1;
nPixelsY = 1; // TODO: nDetPixelsY is not updated.
}
FILE_LOG(logDEBUG1)
<< "Multi Image Info:"
"\n\txoffset: "
@ -585,7 +580,6 @@ void DetectorImpl::readFrameFromReceiver() {
}
} else {
for (uint32_t i = 0; i < nPixelsY; ++i) {
memcpy((multiframe) + ((yoffset + i) * rowoffset) +
xoffset,
image + (i * singledetrowoffset),