Fix stepper cycles calc

This commit is contained in:
Todd Fleming 2017-01-08 18:46:58 -05:00
parent d4cbac2a5c
commit 8a28b4d098

View File

@ -949,7 +949,7 @@ void st_prep_buffer()
float inv_rate = dt/(last_n_steps_remaining - step_dist_remaining); // Compute adjusted step rate inverse
// Compute CPU cycles per step for the prepped segment.
uint32_t cycles = ceil( (TICKS_PER_MICROSECOND*1000000*60)*inv_rate ); // (cycles/step)
uint32_t cycles = ceil( float(SystemCoreClock)*60*inv_rate ); // (cycles/step)
#ifdef ADAPTIVE_MULTI_AXIS_STEP_SMOOTHING
// Compute step timing and multi-axis smoothing level.