diff --git a/raptor_eagle_ccd.cpp b/raptor_eagle_ccd.cpp index 5049414..7e0181a 100644 --- a/raptor_eagle_ccd.cpp +++ b/raptor_eagle_ccd.cpp @@ -784,11 +784,14 @@ void RaptorEagleCCD::startAquisition() .binY = (*this)[CAMERA_ATTR_YBIN], .readRate = (*this)[CAMERA_ATTR_READ_RATE], .readMode = (*this)[CAMERA_ATTR_READ_MODE], + .ccdTemp = (*this)[CAMERA_ATTR_CCD_TEMP], + .tecSetPoint = (*this)[CAMERA_ATTR_TECPOINT], + .tecState = (*this)[CAMERA_ATTR_TECSTATE] == CAMERA_ATTR_TECSTATE_ON ? true : false, + .pcbTemp = (*this)[CAMERA_ATTR_PCB_TEMP], .filename = (*this)[CAMERA_ATTR_FITS_FILENAME], .templateFilename = (*this)[CAMERA_ATTR_FITS_TEMPLATE], .permanentKeywords = _permanentFitsKeywords, // copy .currentKeywords = std::move(_currentFitsKeywords) // move!!! - })); // arm grabber diff --git a/raptor_eagle_ccd.h b/raptor_eagle_ccd.h index 6d72ec5..9ef0d3f 100644 --- a/raptor_eagle_ccd.h +++ b/raptor_eagle_ccd.h @@ -9,6 +9,7 @@ #include #include +#include #include "raptor_eagle_exception.h" @@ -29,6 +30,8 @@ public: // separator char sequence of serialized representation of user FITS keywords array static constexpr std::string_view USER_FITS_KEY_SEP_SEQ{"\n"}; + static constexpr size_t DEFAULT_ACQ_RING_BUFFER_SIZE = 3; + /* some Eagle V camera constants */ // static constexpr double EAGLE_CAMERA_MAX_EXPTIME = 27487.7906944; // in seconds (0xFFFFFFFFFF * 25nsec) static constexpr double EAGLE_CAMERA_MAX_EXPTIME = 2.5E-8 * 0xFFFFFFFFFF; // in seconds (0xFFFFFFFFFF * 25nsec) @@ -147,15 +150,24 @@ private: std::chrono::utc_clock::time_point startTime; std::chrono::utc_clock::time_point abortTime; bool saveInAbort; + double expTime; // in seconds + uint16_t roiStartX; uint16_t roiStartY; uint16_t roiWidth; uint16_t roiHeight; uint8_t binX; uint8_t binY; + std::string_view readRate; std::string_view readMode; + + double ccdTemp; + double tecSetPoint; + bool tecState; + double pcbTemp; + std::string filename; std::string templateFilename; std::vector permanentKeywords; @@ -195,7 +207,7 @@ private: uint16_t _dimCCD[2] = {2048, 2048}; // init to E2V 4240 CCD dimension - // CCD temperature and TEC set point calibration data + // CCD temperature and TEC set point calibration relation coefficients double _adcCCDTempCalibCoeffs[2] = {0, 0}; // [k, b], Temp(degs C) = k*ADC + b // [k, b, k_rev, b_rev] @@ -216,6 +228,9 @@ private: std::vector _currentFitsKeywords; // current acquisition FITS keywords std::vector _permanentFitsKeywords; // permanent user FITS keywords + // std::list> _acqRingBuffer; + std::list, size_t>> _acqRingBuffer; + // hardware version info byte_seq_t _microVersion; // microcontroller version: _microVersion[0] - major, _microVersion[1] - minor @@ -304,10 +319,12 @@ private: void xclibApiCall(int err, const adc::traits::adc_input_char_range auto& func_name) { if (err < 0) { + auto s_err = pxd_mesgErrorCode(err); + if (std::ranges::size(func_name)) { - logError("XCLIB API call ('{}') returns: {} ({})", func_name, err, pxd_mesgErrorCode(err)); + logError("XCLIB API call ('{}') returns: {} ({})", func_name, err, s_err); } else { - logError("XCLIB API call returns: {} ({})", err, pxd_mesgErrorCode(err)); + logError("XCLIB API call returns: {} ({})", err, s_err); } if constexpr (!NOEXCEPT) {