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 1
1
# Unreleased Features
2
2
Please add a note of your changes below this heading if you make a Pull Request.
3
3
4
- ### Changed
5
- Fixed the encoder offset calibration to work correctly when calib_scan_distance is not a multiple of 4pi
6
-
7
4
# Releases
8
5
## [ 0.5.1] - 2020-09-27
9
6
### Added
Original file line number Diff line number Diff line change @@ -202,13 +202,10 @@ bool Encoder::run_offset_calibration() {
202
202
else
203
203
return false ;
204
204
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
206
206
int i = 0 ;
207
207
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 ))
212
209
return false ; // error set inside enqueue_voltage_timings
213
210
axis_->motor_ .log_timing (TIMING_LOG_ENC_CALIB);
214
211
return ++i < start_lock_duration * current_meas_hz;
You can’t perform that action at this time.
0 commit comments