summaryrefslogtreecommitdiff
path: root/Tonokip_Firmware
diff options
context:
space:
mode:
authorEmanuele Caruso <emanuele.caruso@gmail.com>2011-04-08 23:36:38 +0200
committerEmanuele Caruso <emanuele.caruso@gmail.com>2011-04-08 23:36:38 +0200
commitd8f195bd3f12b5fc7ebe2b6af65582008fa19c2f (patch)
tree3c62615f4fd0a30b938b5460b8cd782513f47eea /Tonokip_Firmware
parent8f8acb8e5bfd0979ec1364da11e02e622496bab3 (diff)
Fixed acceleration bug: thank you jeanmarc for pointing that out!
Diffstat (limited to 'Tonokip_Firmware')
-rw-r--r--Tonokip_Firmware/Tonokip_Firmware.pde3
1 files changed, 2 insertions, 1 deletions
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;