This commit is contained in:
2025-09-22 17:46:52 +03:00
parent 1a4d998141
commit fedc324410
4 changed files with 24 additions and 6 deletions

View File

@@ -193,9 +193,9 @@ public:
// apparent_X = encoder_X + res.pcmX
// apparent_Y = encoder_Y + res.pcmY
// so, input x and y are assumed to be mount axis encoder coordinates
template <typename T = std::nullptr_t>
error_t computePCM(mcc_celestial_point_c auto pt, mcc_PCM_c auto* res, T* app_pt = nullptr)
requires(mcc_celestial_point_c<T> || mcc_eqt_hrz_coord_c<T> || std::same_as<T, std::nullptr_t>)
template <typename T>
error_t computePCM(mcc_celestial_point_c auto pt, mcc_PCM_result_c auto* res, T* app_pt = nullptr)
requires(mcc_celestial_point_c<T> || mcc_eqt_hrz_coord_c<T>)
{
if (res == nullptr) {
return MccDefaultPCMErrorCode::ERROR_NULLPTR;
@@ -274,7 +274,7 @@ public:
static_assert(false, "UNSUPPORTED");
}
if constexpr (!std::is_null_pointer_v<T>) {
if (app_pt != nullptr) {
if constexpr (mcc_eqt_hrz_coord_c<T>) {
if constexpr (mccIsEquatorialMount(mountType)) {
app_pt->HA = pt.X + res->pcmX;