remove logging flood

This commit is contained in:
Timur A. Fatkhullin 2024-12-13 12:09:56 +03:00
parent 16e58f264f
commit fd03e903c4
2 changed files with 14 additions and 10 deletions

View File

@ -56,3 +56,8 @@ install(TARGETS ${RAPTOR_EAGLEV_LIB}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
) )
# install(TARGETS ${RAPTOR_EAGLEV_LIB} ${RAPTOR_EAGLEV_SERVER}
# LIBRARY DESTINATION "/home/obs/TMP"
# ARCHIVE DESTINATION "/home/obs/TMP"
# RUNTIME DESTINATION "/home/obs/TMP"
# )

View File

@ -388,22 +388,21 @@ size_t RaptorEagleCCD::clRead(byte_seq_t& bytes)
auto start_tp = std::chrono::steady_clock::now(); auto start_tp = std::chrono::steady_clock::now();
// // how many byte are available // how many byte are available
// xclibApiCall(nbytes = pxd_serialRead(_cameraUnitmap, 0, nullptr, 0), xclibApiCall(nbytes = pxd_serialRead(_cameraUnitmap, 0, nullptr, 0),
// std::format("pxd_serialRead({}, 0, NULL, 0)", _cameraUnitmap)); std::format("pxd_serialRead({}, 0, NULL, 0)", _cameraUnitmap));
logWarn("There are no bytes in Rx-buffer! Waiting for {} as timeout ...", CL_DEFAULT_TIMEOUT);
// if (!nbytes) { // if (!nbytes) {
// logWarn("There are no bytes in Rx-buffer! Nothing to do!"); // logWarn("There are no bytes in Rx-buffer! Nothing to do!");
// return 0; // return 0;
// } // }
do { while ((std::chrono::steady_clock::now() - start_tp) <= CL_DEFAULT_TIMEOUT) {
// how many byte are available std::this_thread::sleep_for(std::chrono::milliseconds(5));
xclibApiCall(nbytes = pxd_serialRead(_cameraUnitmap, 0, nullptr, 0), nbytes = pxd_serialRead(_cameraUnitmap, 0, nullptr, 0);
std::format("pxd_serialRead({}, 0, NULL, 0)", _cameraUnitmap)); }
logWarn("There are no bytes in Rx-buffer! Waiting for ...");
std::this_thread::sleep_for(std::chrono::milliseconds(1));
} while ((std::chrono::steady_clock::now() - start_tp) <= CL_DEFAULT_TIMEOUT);
if (!nbytes) { if (!nbytes) {
logWarn("Cameralink reading operation timeout!"); logWarn("Cameralink reading operation timeout!");