diff --git a/src/modules/motion.h b/src/modules/motion.h index 109bc96..e33ed60 100644 --- a/src/modules/motion.h +++ b/src/modules/motion.h @@ -123,7 +123,7 @@ public: /// be supplied as the first template argument: PlanMoveTo(pos, rate). /// @see PlanMoveTo, unitToSteps template - void PlanMoveTo(AxisUnit pos, AxisUnit feedrate) { + constexpr void PlanMoveTo(AxisUnit pos, AxisUnit feedrate) { PlanMoveTo(A, pos.v, feedrate.v); } @@ -131,7 +131,7 @@ public: /// needs to be supplied as the first template argument: PlanMoveTo(pos, rate). /// @see PlanMoveTo, unitToSteps template - void PlanMoveTo(config::Unit pos, + constexpr void PlanMoveTo(config::Unit pos, config::Unit feedrate) { static_assert(B == axisParams[A].unitBase, "incorrect unit base"); PlanMoveTo( @@ -152,7 +152,7 @@ public: /// be supplied as the first template argument: PlanMove(pos, rate). /// @see PlanMove, unitToSteps template - void PlanMove(AxisUnit delta, AxisUnit feedrate) { + constexpr void PlanMove(AxisUnit delta, AxisUnit feedrate) { PlanMove(A, delta.v, feedrate.v); } @@ -160,7 +160,7 @@ public: /// be supplied as the first template argument: PlanMove(pos, rate). /// @see PlanMove, unitToSteps template - void PlanMove(config::Unit delta, + constexpr void PlanMove(config::Unit delta, config::Unit feedrate) { static_assert(B == axisParams[A].unitBase, "incorrect unit base"); PlanMove(