Skip to content
Browse files

Fixed deceleration bug for constant acceleration

  • Loading branch information...
1 parent d36d7ca commit 3f541055df1c9e2913a0e2b6e3b876deb99b4014 @caru caru committed May 4, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 Tonokip_Firmware/Tonokip_Firmware.pde
View
2 Tonokip_Firmware/Tonokip_Firmware.pde
@@ -1040,7 +1040,7 @@ void linear_move(unsigned long x_steps_remaining, unsigned long y_steps_remainin
decelerating = true;
}
long current_speed = (long) ((long) max_speed_steps_per_second - ((((long) steps_per_sqr_second) / 10000)
- * (((micros() - start_move_micros) + interval) / 10000)));
+ * ((micros() - start_move_micros) / 100)));
interval = 100000000 / current_speed;
if (interval > max_interval)
interval = max_interval;

0 comments on commit 3f54105

Please sign in to comment.
Something went wrong with that request. Please try again.