From 5928ade6bef281a9a4f45085889a28432365960f Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Mon, 26 Jul 2021 01:28:29 +0200 Subject: [PATCH] Improve motion::unitToAxisUnit template parameter names --- src/modules/axisunit.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/axisunit.h b/src/modules/axisunit.h index 5a08fde..fbe91e4 100644 --- a/src/modules/axisunit.h +++ b/src/modules/axisunit.h @@ -95,11 +95,11 @@ static constexpr AxisScale axisScale[config::NUM_AXIS] = { /// Convert a unit::Unit to AxisUnit. /// The scaling factor is stored with the pair config::AxisConfig::uSteps and /// config::AxisConfig::stepsPerUnit (one per-axis). -template -static constexpr T unitToAxisUnit(U v) { - static_assert(T::unit == U::unit, "incorrect unit type conversion"); - static_assert(U::base == axisScale[T::axis].base, "incorrect unit base conversion"); - return { (typename T::type_t)(v.v * axisScale[T::axis].stepsPerUnit) }; +template +static constexpr AU unitToAxisUnit(U v) { + static_assert(AU::unit == U::unit, "incorrect unit type conversion"); + static_assert(U::base == axisScale[AU::axis].base, "incorrect unit base conversion"); + return { (typename AU::type_t)(v.v * axisScale[AU::axis].stepsPerUnit) }; } /// Convert an unit::Unit to a steps type (pos_t or steps_t).