From 64bbfea5e3d5df36df034614fc861a0221b0c2ad Mon Sep 17 00:00:00 2001 From: Paul Guenette Date: Mon, 5 Sep 2022 21:55:06 -0700 Subject: [PATCH] Ensure pos_estimate is updated at least once after homing --- Firmware/MotorControl/axis.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Firmware/MotorControl/axis.cpp b/Firmware/MotorControl/axis.cpp index 82556c1c..2e09a231 100644 --- a/Firmware/MotorControl/axis.cpp +++ b/Firmware/MotorControl/axis.cpp @@ -431,6 +431,9 @@ bool Axis::run_homing() { controller_.vel_setpoint_ = 0.0f; controller_.input_pos_updated(); + // Force encoder estimate to update + osDelay(1); + controller_.config_.control_mode = stored_control_mode; controller_.config_.input_mode = stored_input_mode; homing_.is_homed = true;