From a70339c55e2edd334ac17722746bc44e3594dd4f Mon Sep 17 00:00:00 2001 From: "Timur A. Fatkhullin" Date: Sun, 14 Dec 2025 00:25:03 +0300 Subject: [PATCH] ... --- mcc/mcc_generic_mount.h | 2 +- mcc/mcc_moving_controls.h | 8 +++++++- mcc/mcc_pcm.h | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mcc/mcc_generic_mount.h b/mcc/mcc_generic_mount.h index 2d394c6..44c07fe 100644 --- a/mcc/mcc_generic_mount.h +++ b/mcc/mcc_generic_mount.h @@ -260,7 +260,7 @@ public: if (hw_err) { *_mountStatus = mount_status_t::ERROR; - *_lastMountError = mcc_deduce_error_code(hw_err, MccGenericMountErrorCode::ERROR_HW_STOP); + *_lastMountError = mcc_deduce_error_code(hw_err, MccGenericMountErrorCode::ERROR_HW_INIT); } else { logInfo("Generic mount initialization was performed"); diff --git a/mcc/mcc_moving_controls.h b/mcc/mcc_moving_controls.h index 55f3b21..2184489 100644 --- a/mcc/mcc_moving_controls.h +++ b/mcc/mcc_moving_controls.h @@ -163,7 +163,8 @@ public: *_stopMoving = true; *_lastError = MccSimpleMovingControlsErrorCode::ERROR_OK; - auto cb_sptr = std::make_shared(std::forward(mode_switch_calback)); + using cb_func_t = std::function; + auto cb_sptr = std::shared_ptr(new cb_func_t(std::forward(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; diff --git a/mcc/mcc_pcm.h b/mcc/mcc_pcm.h index cb8ca16..e9aa8b3 100644 --- a/mcc/mcc_pcm.h +++ b/mcc/mcc_pcm.h @@ -105,7 +105,7 @@ public: typedef double coord_t; - // "classic" geometric PEC coefficients + // "classic" geometric PCM coefficients struct pcm_geom_coeffs_t { typedef double coeff_t;