fixes (delete unusefull STATUS_ARMED status)
This commit is contained in:
parent
7497b72b32
commit
b8c4af0e85
@ -76,7 +76,7 @@ void RaptorEagleCCD::AcquisitionProcess::start(const std::shared_ptr<acq_params_
|
|||||||
std::stringstream st;
|
std::stringstream st;
|
||||||
st << std::this_thread::get_id();
|
st << std::this_thread::get_id();
|
||||||
|
|
||||||
_status = STATUS_ARMED;
|
_status = STATUS_ACQ;
|
||||||
|
|
||||||
serverPtr->logDebug("Arm grabber and wait for acquisition starting trigger (thread id: {}) ...", st.str());
|
serverPtr->logDebug("Arm grabber and wait for acquisition starting trigger (thread id: {}) ...", st.str());
|
||||||
|
|
||||||
@ -380,7 +380,6 @@ void RaptorEagleCCD::AcquisitionProcess::start(const std::shared_ptr<acq_params_
|
|||||||
serverPtr->logDebug("Return buffer address {} to queue of free", (void*)_acqParams->imageBufferPtr);
|
serverPtr->logDebug("Return buffer address {} to queue of free", (void*)_acqParams->imageBufferPtr);
|
||||||
|
|
||||||
acqProcSptr.erase(self);
|
acqProcSptr.erase(self);
|
||||||
|
|
||||||
}).detach();
|
}).detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,9 +416,6 @@ std::string RaptorEagleCCD::AcquisitionProcess::status()
|
|||||||
case STATUS_IDLE:
|
case STATUS_IDLE:
|
||||||
stat_str = std::format("{}", CAMERA_ATTR_CAMERA_STATUS_IDLE);
|
stat_str = std::format("{}", CAMERA_ATTR_CAMERA_STATUS_IDLE);
|
||||||
break;
|
break;
|
||||||
case STATUS_ARMED: // actually it should not be! but it presents here for debug reasons
|
|
||||||
stat_str = std::format("{}", CAMERA_ATTR_CAMERA_STATUS_ARMED);
|
|
||||||
break;
|
|
||||||
case STATUS_ACQ: {
|
case STATUS_ACQ: {
|
||||||
std::chrono::duration<double> curr_exp = std::chrono::utc_clock::now() - _acqParams->startTime;
|
std::chrono::duration<double> curr_exp = std::chrono::utc_clock::now() - _acqParams->startTime;
|
||||||
auto remain_exp = _acqParams->expTime - curr_exp.count();
|
auto remain_exp = _acqParams->expTime - curr_exp.count();
|
||||||
|
|||||||
@ -185,7 +185,8 @@ RaptorEagleCCD::~RaptorEagleCCD()
|
|||||||
|
|
||||||
// wait for detached acquisition threads?
|
// wait for detached acquisition threads?
|
||||||
if (AcquisitionProcess::acqProcSptr.size()) {
|
if (AcquisitionProcess::acqProcSptr.size()) {
|
||||||
logInfo("DTOR: waiting for the end of the acquisition process {} ...", AcquisitionProcess::acqProcSptr.size() > 1 ? "threads" : "thread");
|
logInfo("DTOR: waiting for the end of the acquisition process {} ...",
|
||||||
|
AcquisitionProcess::acqProcSptr.size() > 1 ? "threads" : "thread");
|
||||||
|
|
||||||
auto start = std::chrono::utc_clock::now();
|
auto start = std::chrono::utc_clock::now();
|
||||||
while (AcquisitionProcess::acqProcSptr.size()) {
|
while (AcquisitionProcess::acqProcSptr.size()) {
|
||||||
@ -1112,6 +1113,7 @@ void RaptorEagleCCD::startAquisition()
|
|||||||
// start acquisition here
|
// start acquisition here
|
||||||
acq_pars->startTime = setTriggerRegisterBit(CL_TRIGGER_MODE_SNAPSHOT_BIT);
|
acq_pars->startTime = setTriggerRegisterBit(CL_TRIGGER_MODE_SNAPSHOT_BIT);
|
||||||
|
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||||
int status;
|
int status;
|
||||||
xclibApiCall(status = pxd_goneLive(_cameraUnitmap, 0), std::format("pxd_goneLive({}, 0)", _cameraUnitmap));
|
xclibApiCall(status = pxd_goneLive(_cameraUnitmap, 0), std::format("pxd_goneLive({}, 0)", _cameraUnitmap));
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
|
|||||||
@ -226,7 +226,7 @@ private:
|
|||||||
|
|
||||||
std::shared_ptr<acq_params_t> _acqParams{};
|
std::shared_ptr<acq_params_t> _acqParams{};
|
||||||
|
|
||||||
enum int8_t { STATUS_IDLE, STATUS_ARMED, STATUS_ACQ, STATUS_READ, STATUS_SAVE };
|
enum int8_t { STATUS_IDLE, STATUS_ACQ, STATUS_READ, STATUS_SAVE };
|
||||||
std::atomic_int8_t _status = STATUS_IDLE;
|
std::atomic_int8_t _status = STATUS_IDLE;
|
||||||
std::mutex _statusMutex;
|
std::mutex _statusMutex;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user