motion: Allow to get the motion controller for any axis

pull/167/head
Yuri D'Elia 2022-05-11 01:25:19 +02:00
parent 5dce2742fe
commit 5c848b0655
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