motion: Allow to get the motion controller for any axis

pull/161/head
Yuri D'Elia 2022-05-11 01:25:19 +02:00 committed by DRracer
parent db494722aa
commit 1a2034f545
1 changed files with 5 additions and 0 deletions

View File

@ -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