Skip to content

Commit

Permalink
Puts fmodf_pos back into the steps_ assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbelobb committed Mar 29, 2022
1 parent f8a0027 commit a165fbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Firmware/MotorControl/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit a165fbe

Please sign in to comment.