mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
solved the gui 4 bit bug where no data was displayed: due to byterperchannel being int and a 0
This commit is contained in:
@ -5285,11 +5285,12 @@ void multiSlsDetector::readFrameFromReceiver(){
|
|||||||
string currentFileName = "";
|
string currentFileName = "";
|
||||||
|
|
||||||
//getting sls values
|
//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]){
|
if(detectors[0]){
|
||||||
slsdatabytes = detectors[0]->getDataBytes();
|
slsdatabytes = detectors[0]->getDataBytes();
|
||||||
slsmaxchannels = detectors[0]->getMaxNumberOfChannels();
|
slsmaxchannels = detectors[0]->getMaxNumberOfChannels();
|
||||||
bytesperchannel = slsdatabytes/slsmaxchannels;
|
bytesperchannel = (double)slsdatabytes/(double)slsmaxchannels;
|
||||||
slsmaxX = detectors[0]->getTotalNumberOfChannels(X);
|
slsmaxX = detectors[0]->getTotalNumberOfChannels(X);
|
||||||
slsmaxY = detectors[0]->getTotalNumberOfChannels(Y);
|
slsmaxY = detectors[0]->getTotalNumberOfChannels(Y);
|
||||||
}
|
}
|
||||||
@ -5356,17 +5357,17 @@ void multiSlsDetector::readFrameFromReceiver(){
|
|||||||
if(bottom[isocket]){
|
if(bottom[isocket]){
|
||||||
//if((((isocket/numSocketsPerSLSDetector)+1)%2) == 0){
|
//if((((isocket/numSocketsPerSLSDetector)+1)%2) == 0){
|
||||||
for(int i=0;i<slsmaxY;++i){
|
for(int i=0;i<slsmaxY;++i){
|
||||||
memcpy(((char*)multiframe) + offsetY[isocket] + offsetX[isocket] + ((slsmaxY-1-i)*maxX*bytesperchannel),
|
memcpy(((char*)multiframe) + offsetY[isocket] + offsetX[isocket] + (int)((slsmaxY-1-i)*maxX*bytesperchannel),
|
||||||
(char*)image+ i*(slsmaxX/numSocketsPerSLSDetector)*bytesperchannel,
|
(char*)image+ (int)(i*(slsmaxX/numSocketsPerSLSDetector)*bytesperchannel),
|
||||||
(slsmaxX/numSocketsPerSLSDetector)*bytesperchannel);
|
(int)(slsmaxX/numSocketsPerSLSDetector)*bytesperchannel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//top
|
//top
|
||||||
else{
|
else{
|
||||||
for(int i=0;i<slsmaxY;++i){
|
for(int i=0;i<slsmaxY;++i){
|
||||||
memcpy(((char*)multiframe) + offsetY[isocket] + offsetX[isocket] + (i*maxX*bytesperchannel),
|
memcpy(((char*)multiframe) + offsetY[isocket] + offsetX[isocket] + (int)(i*maxX*bytesperchannel),
|
||||||
(char*)image+ i*(slsmaxX/numSocketsPerSLSDetector)*bytesperchannel,
|
(char*)image+ (int)(i*(slsmaxX/numSocketsPerSLSDetector)*bytesperchannel),
|
||||||
(slsmaxX/numSocketsPerSLSDetector)*bytesperchannel);
|
(int)(slsmaxX/numSocketsPerSLSDetector)*bytesperchannel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user