This commit is contained in:
Timur A. Fatkhullin
2025-09-01 01:15:23 +03:00
parent c2627ecd89
commit 218da42a1d
6 changed files with 408 additions and 13 deletions

View File

@@ -420,6 +420,14 @@ concept mcc_hardware_c = requires(T t, const T t_const) {
{ t_const.hardwareName() } -> std::formattable<char>;
// the 'T' class must contain static constexpr member of 'MccMountType' type
requires std::same_as<decltype(T::mountType), const MccMountType>;
[]() {
static constexpr MccMountType val = T::mountType;
return val;
}(); // to ensure 'mountType' can be used in compile-time context
// a type that defines at least HW_MOVE_STOPPED, HW_MOVE_SLEWING, HW_MOVE_ADJUSTING, HW_MOVE_TRACKING
// and HW_MOVE_GUIDING compile-time constants. The main purpose of this type is a
// possible tunning of hardware hardwareSetState-related commands and detect stop-state
@@ -657,6 +665,13 @@ struct mcc_telemetry_interface_t {
std::forward<SelfT>(self).targetToMountDiff(pair_kind, dx, dy);
}
// compute distance between target and actual mount celestial points
template <std::derived_from<mcc_telemetry_interface_t> SelfT>
RetT targetToMountDist(this SelfT&& self, mcc_angle_c auto* dist)
{
std::forward<SelfT>(self).targetToMountDist(dist);
}
protected:
mcc_telemetry_interface_t() = default;
};