From d86a86a936c9d844d820dbefdad406f1c0a79701 Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Fri, 3 Sep 2021 15:41:12 +0200 Subject: [PATCH] fix comments --- Firmware/MotorControl/axis.cpp | 1 - Firmware/MotorControl/controller.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/MotorControl/axis.cpp b/Firmware/MotorControl/axis.cpp index ad8c221f..89c56f6b 100644 --- a/Firmware/MotorControl/axis.cpp +++ b/Firmware/MotorControl/axis.cpp @@ -287,7 +287,6 @@ bool Axis::start_closed_loop_control() { } // To avoid any transient on startup, we intialize the setpoint to be the current position - // note - input_pos_ is not set here. It is set to 0 earlier in this method and velocity control is used. if (controller_.config_.control_mode >= Controller::CONTROL_MODE_POSITION_CONTROL) { std::optional pos_init = (controller_.config_.circular_setpoints ? controller_.pos_estimate_circular_src_ : diff --git a/Firmware/MotorControl/controller.cpp b/Firmware/MotorControl/controller.cpp index 7e1df955..59dd1d84 100644 --- a/Firmware/MotorControl/controller.cpp +++ b/Firmware/MotorControl/controller.cpp @@ -9,6 +9,7 @@ bool Controller::apply_config() { } void Controller::reset() { + // pos_setpoint is initialized in start_closed_loop_control vel_setpoint_ = 0.0f; vel_integrator_torque_ = 0.0f; torque_setpoint_ = 0.0f;