mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 12:27:14 +02:00
gotthard server bug fix: switching between roi and no roi has complex fnum reengineering as fnum and pnum doesnt exist for gotthard, sol at the moment: send an image when configuremac, identify first packet if first two channels is 0xcacacaca, ifthe fnum is odd, then increment. Looking at this only at first image in an acquisition, also reduces roi time by configuring mac only when setting roi, not when getting
This commit is contained in:
@ -284,7 +284,6 @@ private:
|
||||
subFrameNumber = -1;
|
||||
bunchId = -1;
|
||||
frameNumber = ((uint32_t)(*((uint32_t*)(packetData))));
|
||||
cprintf(BLUE,"Listening %d: first fnum:%lu\n", index, frameNumber);
|
||||
if (oddStartingPacket)
|
||||
frameNumber++;
|
||||
packetNumber = frameNumber&packetIndexMask;
|
||||
@ -383,9 +382,8 @@ private:
|
||||
if (nPixelsX == 1280) {
|
||||
uint32_t fnum = ((uint32_t)(*((uint32_t*)(packetData))));
|
||||
uint32_t firstData = ((uint32_t)(*((uint32_t*)(packetData + 4))));
|
||||
cprintf(BLUE,"Listening %d: (setoff)fnum:0x%x, firstdata:0x%x\n", index, fnum, firstData);
|
||||
// first packet
|
||||
if (firstData != 0xCACACACA) { cprintf(BLUE,"Listening %d: (setoff) first packet\n", index);
|
||||
if (firstData == 0xCACACACA) {
|
||||
// packet number should be 0, but is 1 => so odd starting packet
|
||||
if (fnum & packetIndexMask) {
|
||||
oddStartingPacket = true;
|
||||
@ -394,7 +392,7 @@ private:
|
||||
}
|
||||
}
|
||||
// second packet
|
||||
else {cprintf(BLUE,"Listening %d: (setoff) second packet\n", index);
|
||||
else {
|
||||
// packet number should be 1, but is 0 => so odd starting packet
|
||||
if (!(fnum & packetIndexMask)) {
|
||||
oddStartingPacket = true;
|
||||
|
Reference in New Issue
Block a user