This commit is contained in:
2025-11-02 14:38:44 +03:00
parent c0f274cec0
commit 6fc0b8bb4e
2 changed files with 18 additions and 6 deletions

View File

@@ -256,8 +256,6 @@ public:
// re-implements SlewModelT::slewToTarget to fetch input target coordinates from intermediate buffer
error_t slewToTarget(bool slew_and_stop = false)
{
*_mountStatus = mount_status_t::SLEWING;
auto err = TelemetryT::setPointingTarget(_enteredTargetCoordiniates);
if (err) {
*_mountStatus = mount_status_t::ERROR;
@@ -265,12 +263,21 @@ public:
return mcc_deduce_error_code(err, MccGenericMountErrorCode::ERROR_SET_TARGET);
}
*_mountStatus = mount_status_t::SLEWING;
auto s_err =
mcc_deduce_error_code(SlewModelT::slewToTarget(slew_and_stop), MccGenericMountErrorCode::ERROR_MOUNT_SLEW);
if (s_err) {
*_mountStatus = mount_status_t::ERROR;
return s_err;
}
if (slew_and_stop) {
*_mountStatus = mount_status_t::IDLE;
}
return mcc_deduce_error_code(SlewModelT::slewToTarget(slew_and_stop),
MccGenericMountErrorCode::ERROR_MOUNT_SLEW);
return s_err;
}
error_t trackTarget()