diff --git a/Firmware/MotorControl/controller.cpp b/Firmware/MotorControl/controller.cpp index cbedb140..ab7e62eb 100644 --- a/Firmware/MotorControl/controller.cpp +++ b/Firmware/MotorControl/controller.cpp @@ -90,7 +90,7 @@ bool Controller::anticogging_calibration(float pos_estimate, float vel_estimate) void Controller::set_input_pos_and_steps(float const pos) { input_pos_ = pos; float const range = config_.circular_setpoint_range; - axis_->steps_ = (int64_t)(wrap_pm(pos, range) / range * config_.steps_per_circular_range); + axis_->steps_ = (int64_t)(fmodf_pos(pos, range) / range * config_.steps_per_circular_range); } void Controller::update_filter_gains() {