...
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user