mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-07-13 03:11:50 +02:00
4 bit mode works without gappixels
This commit is contained in:
@ -5820,10 +5820,17 @@ void multiSlsDetector::readFrameFromReceiver(){
|
|||||||
int slsdatabytes = 0, slsmaxchannels = 0, slsmaxX = 0, slsmaxY=0;
|
int slsdatabytes = 0, slsmaxchannels = 0, slsmaxX = 0, slsmaxY=0;
|
||||||
double bytesperchannel = 0;
|
double bytesperchannel = 0;
|
||||||
if(detectors[0]){
|
if(detectors[0]){
|
||||||
|
slsmaxchannels = detectors[0]->getMaxNumberOfChannels(X) * detectors[0]->getMaxNumberOfChannels(Y);
|
||||||
|
slsdatabytes = detectors[0]->getDataBytes();
|
||||||
bytesperchannel = (double)slsdatabytes/(double)slsmaxchannels;
|
bytesperchannel = (double)slsdatabytes/(double)slsmaxchannels;
|
||||||
slsdatabytes = (bytesperchannel < 1) ? detectors[0]->getDataBytes() : detectors[0]->getDataBytesInclGapPixels();
|
|
||||||
slsmaxchannels = (bytesperchannel < 1) ? (detectors[0]->getMaxNumberOfChannels(X) * detectors[0]->getMaxNumberOfChannels(Y)) :
|
// recalculate with gap pixels (for >= 8 bit mode)
|
||||||
(detectors[0]->getMaxNumberOfChannelsInclGapPixels(X)*detectors[0]->getMaxNumberOfChannelsInclGapPixels(Y));
|
if (bytesperchannel >= 1) {
|
||||||
|
cprintf(RED, "shouldnt be here~\n");
|
||||||
|
slsdatabytes = detectors[0]->getDataBytesInclGapPixels();
|
||||||
|
slsmaxchannels = detectors[0]->getMaxNumberOfChannelsInclGapPixels(X)*detectors[0]->getMaxNumberOfChannelsInclGapPixels(Y);
|
||||||
|
}
|
||||||
|
|
||||||
slsmaxX = (bytesperchannel < 1) ? detectors[0]->getTotalNumberOfChannels(X) : detectors[0]->getTotalNumberOfChannelsInclGapPixels(X);
|
slsmaxX = (bytesperchannel < 1) ? detectors[0]->getTotalNumberOfChannels(X) : detectors[0]->getTotalNumberOfChannelsInclGapPixels(X);
|
||||||
slsmaxY = (bytesperchannel < 1) ? detectors[0]->getTotalNumberOfChannels(Y) : detectors[0]->getTotalNumberOfChannelsInclGapPixels(Y);
|
slsmaxY = (bytesperchannel < 1) ? detectors[0]->getTotalNumberOfChannels(Y) : detectors[0]->getTotalNumberOfChannelsInclGapPixels(Y);
|
||||||
}
|
}
|
||||||
@ -5832,6 +5839,7 @@ void multiSlsDetector::readFrameFromReceiver(){
|
|||||||
int maxY = (bytesperchannel < 1) ? thisMultiDetector->numberOfChannel[Y] : thisMultiDetector->numberOfChannelInclGapPixels[Y];
|
int maxY = (bytesperchannel < 1) ? thisMultiDetector->numberOfChannel[Y] : thisMultiDetector->numberOfChannelInclGapPixels[Y];
|
||||||
int multidatabytes = (bytesperchannel < 1) ? thisMultiDetector->dataBytes : thisMultiDetector->dataBytesInclGapPixels;
|
int multidatabytes = (bytesperchannel < 1) ? thisMultiDetector->dataBytes : thisMultiDetector->dataBytesInclGapPixels;
|
||||||
|
|
||||||
|
|
||||||
//getting multi values
|
//getting multi values
|
||||||
//calculating offsets (for eiger interleaving ports)
|
//calculating offsets (for eiger interleaving ports)
|
||||||
int offsetX[numSockets]; int offsetY[numSockets];
|
int offsetX[numSockets]; int offsetY[numSockets];
|
||||||
|
@ -2009,14 +2009,14 @@ int slsDetector::enableGapPixels(int val) {
|
|||||||
|
|
||||||
if(thisDetector->myDetectorType!= EIGER)
|
if(thisDetector->myDetectorType!= EIGER)
|
||||||
return -1;
|
return -1;
|
||||||
|
if (thisDetector->dynamicRange == 4) return val;
|
||||||
if (val >= 0) {
|
if (val >= 0) {
|
||||||
val=(val>0)?1:0;
|
val=(val>0)?1:0;
|
||||||
|
|
||||||
// send to receiver
|
// send to receiver
|
||||||
int ret=OK;
|
int ret=OK;
|
||||||
|
|
||||||
if (thisDetector->dynamicRange != 4) {
|
//if (thisDetector->dynamicRange != 4) {
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
int retval=-1;
|
int retval=-1;
|
||||||
int fnum=F_ENABLE_GAPPIXELS_IN_RECEIVER;
|
int fnum=F_ENABLE_GAPPIXELS_IN_RECEIVER;
|
||||||
@ -2034,7 +2034,7 @@ int slsDetector::enableGapPixels(int val) {
|
|||||||
if(ret==FORCE_UPDATE)
|
if(ret==FORCE_UPDATE)
|
||||||
updateReceiver();
|
updateReceiver();
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
|
|
||||||
// update client
|
// update client
|
||||||
if (ret == OK) {
|
if (ret == OK) {
|
||||||
|
Reference in New Issue
Block a user