Puts fmodf_pos back into the steps_ assignment

This commit is contained in:
Torbjørn Ludvigsen
2022-04-07 15:10:25 +02:00
parent ae262e4cd1
commit d272fbe2b4
+1 -1
View File
@@ -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() {