This commit is contained in:
Timur A. Fatkhullin 2025-09-16 19:06:37 +03:00
parent 732cd33947
commit 4e3a50acba
3 changed files with 10 additions and 10 deletions

View File

@ -13,4 +13,4 @@ set(ASIBFM700_LIB_SRC asibfm700_common.h asibfm700_servocontroller.h asibfm700_s
set(ASIBFM700_LIB asibfm700mount) set(ASIBFM700_LIB asibfm700mount)
add_library(${ASIBFM700_LIB} STATIC ${ASIBFM700_LIB_SRC} add_library(${ASIBFM700_LIB} STATIC ${ASIBFM700_LIB_SRC}
asibfm700_mount.h asibfm700_mount.cpp) asibfm700_mount.h asibfm700_mount.cpp)
target_link_libraries(${ASIBFM700_LIB} PRIVATE mcc1) target_link_libraries(${ASIBFM700_LIB} PRIVATE mcc)

View File

@ -67,18 +67,18 @@ add_subdirectory(bsplines)
message(STATUS "BSPLINES_INCLUDE_DIR: " ${BSPLINES_INCLUDE_DIR}) message(STATUS "BSPLINES_INCLUDE_DIR: " ${BSPLINES_INCLUDE_DIR})
include_directories(${BSPLINES_INCLUDE_DIR}) include_directories(${BSPLINES_INCLUDE_DIR})
set(MCC_LIBRARY_SRC1 mcc_generics.h mcc_defaults.h mcc_traits.h mcc_utils.h set(MCC_LIBRARY_SRC mcc_generics.h mcc_defaults.h mcc_traits.h mcc_utils.h
mcc_ccte_iers.h mcc_ccte_iers_default.h mcc_ccte_erfa.h mcc_pcm.h mcc_telemetry.h mcc_ccte_iers.h mcc_ccte_iers_default.h mcc_ccte_erfa.h mcc_pcm.h mcc_telemetry.h
mcc_angle.h mcc_pzone.h mcc_pzone_container.h mcc_finite_state_machine.h mcc_angle.h mcc_pzone.h mcc_pzone_container.h mcc_finite_state_machine.h
mcc_generic_mount.h mcc_tracking_model.h mcc_slewing_model.h mcc_moving_model_common.h) mcc_generic_mount.h mcc_tracking_model.h mcc_slewing_model.h mcc_moving_model_common.h)
list(APPEND MCC_LIBRARY_SRC1 mcc_spdlog.h) list(APPEND MCC_LIBRARY_SRC mcc_spdlog.h)
set(MCC_LIBRARY1 mcc1) set(MCC_LIBRARY mcc)
add_library(${MCC_LIBRARY1} INTERFACE ${MCC_LIBRARY_SRC1}) add_library(${MCC_LIBRARY} INTERFACE ${MCC_LIBRARY_SRC})
target_compile_features(${MCC_LIBRARY1} INTERFACE cxx_std_23) target_compile_features(${MCC_LIBRARY} INTERFACE cxx_std_23)
target_include_directories(${MCC_LIBRARY1} INTERFACE ${ERFA_INCLUDE_DIR} ${BSPLINES_INCLUDE_DIR}) target_include_directories(${MCC_LIBRARY} INTERFACE ${ERFA_INCLUDE_DIR} ${BSPLINES_INCLUDE_DIR})
target_include_directories(${MCC_LIBRARY1} INTERFACE target_include_directories(${MCC_LIBRARY} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/mcc> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/mcc>
) )

View File

@ -385,7 +385,7 @@ public:
template <traits::mcc_time_duration_c DT> template <traits::mcc_time_duration_c DT>
DT telemetryDataUpdateInterval() const DT telemetryDataUpdateInterval() const
{ {
std::lock_guard lock{_currentUpdateIntervalMutex}; std::lock_guard lock{*_currentUpdateIntervalMutex};
return std::chrono::duration_cast<DT>(_currentUpdateInterval); return std::chrono::duration_cast<DT>(_currentUpdateInterval);
} }
@ -426,7 +426,7 @@ public:
} }
{ {
std::lock_guard lock{_currentUpdateIntervalMutex}; std::lock_guard lock{*_currentUpdateIntervalMutex};
// compute it here because of possible changing _currentUpdateInterval // compute it here because of possible changing _currentUpdateInterval
auto sleep_td = _currentUpdateInterval / internalUpdatingIntervalDiv; auto sleep_td = _currentUpdateInterval / internalUpdatingIntervalDiv;