fix status string, free memory in AcquisitionProcess instance
This commit is contained in:
parent
0ece075bb8
commit
ea9b099d81
@ -400,6 +400,8 @@ void RaptorEagleCCD::AcquisitionProcess::start(const std::shared_ptr<acq_params_
|
||||
} else {
|
||||
_manager->logInfo("FITS file '{}' is saved", _acqParams->filename);
|
||||
}
|
||||
|
||||
_imageBuffer.release();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -1231,8 +1231,13 @@ void RaptorEagleCCD::initAttrComm()
|
||||
} else {
|
||||
auto sptr = it->lock();
|
||||
auto st = sptr->status();
|
||||
if (st.substr(0, 3) == "ACQ") { // if the camera is acquiring then
|
||||
if (st.substr(0, CAMERA_ATTR_CAMERA_STATUS_ACQ.size()) ==
|
||||
CAMERA_ATTR_CAMERA_STATUS_ACQ) { // if the camera is acquiring then
|
||||
s_head = st + ","; // return it at the beginning of the status string
|
||||
} else if (st.substr(0, CAMERA_ATTR_CAMERA_STATUS_IDLE.size()) == CAMERA_ATTR_CAMERA_STATUS_IDLE) {
|
||||
// here, cquisition process is already inactive
|
||||
it = _acqProcesses.erase(it);
|
||||
continue;
|
||||
} else {
|
||||
std::ranges::copy(st, std::back_inserter(s));
|
||||
s += ",";
|
||||
@ -1244,9 +1249,9 @@ void RaptorEagleCCD::initAttrComm()
|
||||
|
||||
if (!s.empty() || !s_head.empty()) {
|
||||
s = s_head + s;
|
||||
if (_acqProcesses.size() == 1) {
|
||||
// if (_acqProcesses.size() == 1) {
|
||||
s.resize(s.size() - 1); // delete trailing ","
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
s = std::string{CAMERA_ATTR_CAMERA_STATUS_IDLE.begin(), CAMERA_ATTR_CAMERA_STATUS_IDLE.end()};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user