From 3f541055df1c9e2913a0e2b6e3b876deb99b4014 Mon Sep 17 00:00:00 2001 From: Emanuele Caruso Date: Wed, 4 May 2011 23:14:00 +0200 Subject: Fixed deceleration bug for constant acceleration --- Tonokip_Firmware/Tonokip_Firmware.pde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Tonokip_Firmware/Tonokip_Firmware.pde') diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde index 62b2d34..bb77f7e 100644 --- a/Tonokip_Firmware/Tonokip_Firmware.pde +++ b/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; -- cgit v1.2.1