File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 11# Unreleased Features
22Please add a note of your changes below this heading if you make a Pull Request.
33
4- ### Changed
5- Fixed the encoder offset calibration to work correctly when calib_scan_distance is not a multiple of 4pi
6-
74# Releases
85## [ 0.5.1] - 2020-09-27
96### Added
Original file line number Diff line number Diff line change @@ -202,13 +202,10 @@ bool Encoder::run_offset_calibration() {
202202 else
203203 return false ;
204204
205- // go to start position of forward scan for start_lock_duration to get ready to scan
205+ // go to motor zero phase for start_lock_duration to get ready to scan
206206 int i = 0 ;
207207 axis_->run_control_loop ([&](){
208- float phase = wrap_pm_pi (0 - config_.calib_scan_distance / 2 .0f );
209- float v_alpha = voltage_magnitude * our_arm_cos_f32 (phase);
210- float v_beta = voltage_magnitude * our_arm_sin_f32 (phase);
211- if (!axis_->motor_ .enqueue_voltage_timings (v_alpha, v_beta))
208+ if (!axis_->motor_ .enqueue_voltage_timings (voltage_magnitude, 0 .0f ))
212209 return false ; // error set inside enqueue_voltage_timings
213210 axis_->motor_ .log_timing (TIMING_LOG_ENC_CALIB);
214211 return ++i < start_lock_duration * current_meas_hz;
You can’t perform that action at this time.
0 commit comments