mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 00:07:13 +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:
@ -1438,6 +1438,31 @@ int configureMAC(int ipad,long long int macad,long long int detectormacad, int d
|
||||
|
||||
usleep(1000 * 1000);
|
||||
|
||||
/** send out first image as first packet does not give 0xcacacaca (needed to know if first image
|
||||
* when switching back and forth between roi and no roi
|
||||
*/
|
||||
// remember old parameters
|
||||
uint64_t oldtiming = setTiming(-1);
|
||||
uint64_t oldframes = setFrames(-1);
|
||||
uint64_t oldPeriod = setPeriod(-1);
|
||||
uint64_t oldExptime = setExposureTime(-1);
|
||||
|
||||
// set to basic parameters
|
||||
setTiming(AUTO_TIMING);
|
||||
setFrames(1);
|
||||
setPeriod(1e6);
|
||||
setExposureTime(1e5);
|
||||
|
||||
// take an image
|
||||
startStateMachine();
|
||||
waitForAcquisitionFinish();
|
||||
|
||||
// set to previous parameters
|
||||
setTiming(oldtiming);
|
||||
setFrames(oldframes);
|
||||
setPeriod(oldPeriod);
|
||||
setExposureTime(oldExptime);
|
||||
|
||||
return adcConfigured;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user