motion: Improve legibility of motion::SetPosition

pull/153/head
Yuri D'Elia 2022-01-30 12:04:48 +01:00 committed by DRracer
parent 5ba8ba9646
commit 2e32204d17
1 changed files with 3 additions and 3 deletions

View File

@ -176,13 +176,13 @@ public:
/// Set the position of an axis. Should only be called when the queue is empty.
/// @param axis axis affected
/// @param x position to set
void SetPosition(Axis axis, pos_t x)
#if !defined(UNITTEST) || defined(UNITTEST_MOTION)
{
void SetPosition(Axis axis, pos_t x) {
axisData[axis].ctrl.SetPosition(x);
}
#else
;
// Force STUB for testing
void SetPosition(Axis axis, pos_t x);
#endif
/// Get current acceleration for the selected axis