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

View File

@ -260,7 +260,7 @@ public:
if (hw_err) { if (hw_err) {
*_mountStatus = mount_status_t::ERROR; *_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 { } else {
logInfo("Generic mount initialization was performed"); logInfo("Generic mount initialization was performed");

View File

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

View File

@ -105,7 +105,7 @@ public:
typedef double coord_t; typedef double coord_t;
// "classic" geometric PEC coefficients // "classic" geometric PCM coefficients
struct pcm_geom_coeffs_t { struct pcm_geom_coeffs_t {
typedef double coeff_t; typedef double coeff_t;