This commit is contained in:
2025-12-22 17:13:04 +03:00
parent 2c7d563994
commit 54d6c25171
6 changed files with 80 additions and 18 deletions

View File

@@ -184,7 +184,7 @@ public:
decltype([](typename MountT::mount_status_t) {})>
MccSimpleMovingControls(
MountT* mount,
CallbackFuncT&& mode_switch_calback = [](typename MountT::mount_status_t) {})
CallbackFuncT&& mode_switch_callback = [](typename MountT::mount_status_t) {})
: _stopMoving(new std::atomic_bool), _currentParamsMutex(new std::mutex), _lastError(new std::atomic<error_t>)
{
auto send_to_hardware = [mount](typename MountT::hardware_state_t const& hw_state) {
@@ -309,7 +309,7 @@ public:
*_lastError = MccSimpleMovingControlsErrorCode::ERROR_OK;
using cb_func_t = std::function<void(typename MountT::mount_status_t)>;
auto cb_sptr = std::shared_ptr<cb_func_t>(new cb_func_t(std::forward<CallbackFuncT>(mode_switch_calback)));
auto cb_sptr = std::shared_ptr<cb_func_t>(new cb_func_t(std::forward<CallbackFuncT>(mode_switch_callback)));
/* stop moving function */