This commit is contained in:
Will Smith
2023-03-02 16:27:54 +00:00
parent d88206e027
commit 262f15bd87

View File

@@ -901,25 +901,25 @@ void AndorCCD::setupTrackDefn(int minX, int sizeX, int binX)
setIntegerParam(NDArraySizeY, mMultiTrack.DataHeight());
for (size_t TrackNo = 0; TrackNo < mMultiTrack.size(); TrackNo++)
{
/*
Each track must be defined by a group of six integers.
- The top and bottom positions of the tracks.
- The left and right positions for the area of interest within each track
- The horizontal and vertical binning for each track. */
/*
Andor use 1-based exclusive co-ordinates.
e.g. from SDK manual:
1 2 1 1024 1 1
3 4 1 1024 1 1
5 6 1 1024 1 1
7 8 1 1024 1 1
9 10 1 1024 1 1 */
TrackDefn[TrackNo * 6 + 0] = mMultiTrack.TrackStart(TrackNo) + 1;
TrackDefn[TrackNo * 6 + 1] = mMultiTrack.TrackEnd(TrackNo) + 2; // CCDMultiTrack uses 0-based inlcusive co-ordinates.
TrackDefn[TrackNo * 6 + 2] = minX + 1;
TrackDefn[TrackNo * 6 + 3] = minX + sizeX;
TrackDefn[TrackNo * 6 + 4] = binX;
TrackDefn[TrackNo * 6 + 5] = mMultiTrack.TrackBin(TrackNo);
/*
Each track must be defined by a group of six integers.
- The top and bottom positions of the tracks.
- The left and right positions for the area of interest within each track
- The horizontal and vertical binning for each track. */
/*
Andor use 1-based exclusive co-ordinates.
e.g. from SDK manual:
1 2 1 1024 1 1
3 4 1 1024 1 1
5 6 1 1024 1 1
7 8 1 1024 1 1
9 10 1 1024 1 1 */
TrackDefn[TrackNo * 6 + 0] = mMultiTrack.TrackStart(TrackNo) + 1;
TrackDefn[TrackNo * 6 + 1] = mMultiTrack.TrackEnd(TrackNo) + 2; // CCDMultiTrack uses 0-based inlcusive co-ordinates.
TrackDefn[TrackNo * 6 + 2] = minX + 1;
TrackDefn[TrackNo * 6 + 3] = minX + sizeX;
TrackDefn[TrackNo * 6 + 4] = binX;
TrackDefn[TrackNo * 6 + 5] = mMultiTrack.TrackBin(TrackNo);
}
checkStatus(SetCustomTrackHBin(binX));
checkStatus(SetComplexImage(int(TrackDefn.size() / ValuesPerTrack), &TrackDefn[0]));
@@ -1409,8 +1409,8 @@ asynStatus AndorCCD::setupAcquisition()
driverName, functionName, verticalShiftPeriod);
checkStatus(SetVSSpeed(verticalShiftPeriod));
if ((mCapabilities.ulSetFunctions & AC_SETFUNCTION_VSAMPLITUDE) != 0)
{
if ((mCapabilities.ulSetFunctions & AC_SETFUNCTION_VSAMPLITUDE) != 0)
{
asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW,
"%s:%s:, SetVSAmplitude(%d)\n",
driverName, functionName, verticalShiftAmplitude);
@@ -1683,21 +1683,16 @@ void AndorCCD::dataTask(void)
ADDriver::setShutter(ADShutterClosed);
}
// Wait for the status thread to set ADStatus to something other than Acquiring
while (1) {
epicsInt32 acquireStatus;
getIntegerParam(ADStatus,&acquireStatus);
if (acquireStatus!=ADStatusAcquire) break;
// Allow other threads to update ADStatusAcquire
this->unlock();
epicsThreadSleep(0.01);
this->lock();
}
// Now clear main thread flag. W
// Now clear main thread flag
mAcquiringData = 0;
setIntegerParam(ADAcquire, 0);
// Wait for the status thread to set ADStatus to something other than ADStatusAcquire
while (1) {
epicsInt32 acquireStatus;
getIntegerParam(ADStatus, &acquireStatus);
if (acquireStatus != ADStatusAcquire) break;
epicsThreadSleep(0.01);
}
/* Call the callbacks to update any changes */
callParamCallbacks();