From d8f195bd3f12b5fc7ebe2b6af65582008fa19c2f Mon Sep 17 00:00:00 2001 From: Emanuele Caruso Date: Fri, 8 Apr 2011 23:36:38 +0200 Subject: Fixed acceleration bug: thank you jeanmarc for pointing that out! --- Tonokip_Firmware/Tonokip_Firmware.pde | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Tonokip_Firmware') diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde index 51ae3ea..3232e14 100644 --- a/Tonokip_Firmware/Tonokip_Firmware.pde +++ b/Tonokip_Firmware/Tonokip_Firmware.pde @@ -778,9 +778,10 @@ void linear_move(unsigned long x_steps_remaining, unsigned long y_steps_remainin steps_to_take = delta_x; max_interval = max_x_interval; } + acceleration_enabled = true; if(full_velocity_steps == 0) full_velocity_steps++; long full_interval = max(interval, max_interval - ((max_interval - full_interval) * full_velocity_steps / virtual_full_velocity_steps)); - if(full_interval == interval) acceleration_enabled = false; + if(interval > max_interval) acceleration_enabled = false; unsigned long steps_done = 0; unsigned int steps_acceleration_check = 1; -- cgit v1.2.1