diff --git a/src/modules/motion.h b/src/modules/motion.h index a74f7f7..15c3ec5 100644 --- a/src/modules/motion.h +++ b/src/modules/motion.h @@ -340,6 +340,11 @@ public: return axisData[axis].drv; } + /// @returns the controller associated with the particular axis + inline const pulse_gen::PulseGen &CtrlForAxis(Axis axis) const { + return axisData[axis].ctrl; + } + private: struct AxisData { TMC2130 drv; ///< Motor driver