This commit is contained in:
2025-09-17 18:21:32 +03:00
parent 281ceacf89
commit 1087e043a8
9 changed files with 86 additions and 27 deletions

View File

@@ -12,7 +12,7 @@ namespace mcc
{
enum MccAltLimitPZErrorCode : int { ERROR_OK, ERROR_NULLPTR, ERROR_COORD_TRANSFROM, ERROR_PCM_COMP };
enum class MccAltLimitPZErrorCode : int { ERROR_OK, ERROR_NULLPTR, ERROR_COORD_TRANSFROM, ERROR_PCM_COMP };
} // namespace mcc
@@ -621,7 +621,7 @@ public:
}
consteval std::string_view name()
consteval std::string_view name() const
{
return axisKind == MccCoordKind::COORDS_KIND_AZ ? "AZ_AXIS-LIMITSWITCH_ZONE"
: axisKind == MccCoordKind::COORDS_KIND_HA ? "HA_AXIS-LIMITSWITCH_ZONE"
@@ -750,6 +750,17 @@ public:
requires((mcc_eqt_hrz_coord_c<InputT> || mcc_celestial_point_c<InputT>) &&
(mcc_eqt_hrz_coord_c<ResultT> || mcc_celestial_point_c<ResultT>))
{
if (point == nullptr) {
return MccAltLimitPZErrorCode::ERROR_NULLPTR;
}
point->X = _minLimit;
// if constexpr (mcc_eqt_hrz_coord_c<ResultT>) {
// point->X = _minLimit;
// } else { // mcc_celestial_point_c
// point->X = _minLimit;
// }
return MccAltLimitPZErrorCode::ERROR_OK;
}