From c47f2f34495b2dd8a084a4fe1d4f3cee8fc424e4 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Thu, 23 Mar 2017 13:31:22 +0100 Subject: [PATCH] solved the gui 4 bit bug where no data was displayed: due to byterperchannel being int and a 0 --- .../multiSlsDetector/multiSlsDetector.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 7caccea09..6a838656d 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -5285,11 +5285,12 @@ void multiSlsDetector::readFrameFromReceiver(){ string currentFileName = ""; //getting sls values - int slsdatabytes = 0, slsmaxchannels = 0, bytesperchannel = 0, slsmaxX = 0, slsmaxY=0, nx=0, ny=0; + int slsdatabytes = 0, slsmaxchannels = 0, slsmaxX = 0, slsmaxY=0, nx=0, ny=0; + double bytesperchannel = 0; if(detectors[0]){ slsdatabytes = detectors[0]->getDataBytes(); slsmaxchannels = detectors[0]->getMaxNumberOfChannels(); - bytesperchannel = slsdatabytes/slsmaxchannels; + bytesperchannel = (double)slsdatabytes/(double)slsmaxchannels; slsmaxX = detectors[0]->getTotalNumberOfChannels(X); slsmaxY = detectors[0]->getTotalNumberOfChannels(Y); } @@ -5356,17 +5357,17 @@ void multiSlsDetector::readFrameFromReceiver(){ if(bottom[isocket]){ //if((((isocket/numSocketsPerSLSDetector)+1)%2) == 0){ for(int i=0;i