This commit is contained in:
2025-12-14 00:25:03 +03:00
parent 6fca94e571
commit a70339c55e
3 changed files with 9 additions and 3 deletions

View File

@@ -163,7 +163,8 @@ public:
*_stopMoving = true;
*_lastError = MccSimpleMovingControlsErrorCode::ERROR_OK;
auto cb_sptr = std::make_shared(std::forward<CallbackFuncT>(mode_switch_calback));
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)));
_slewingFunc = [mount, cb_sptr, this](bool slew_and_stop) {
double braking_accelX, braking_accelY;
@@ -288,6 +289,11 @@ public:
};
}
virtual ~MccSimpleMovingControls()
{
*_stopMoving = true;
}
error_t slewToTarget(bool slew_and_stop = false)
{
return *_lastError;