summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Caruso <emanuele.caruso@gmail.com>2011-05-04 23:14:00 +0200
committerEmanuele Caruso <emanuele.caruso@gmail.com>2011-05-04 23:14:00 +0200
commit3f541055df1c9e2913a0e2b6e3b876deb99b4014 (patch)
treedf9cefa381f95a972af9a31f22f966110f18bd9c
parentd36d7ca49965ea1ef70b5f66b8d3b0178d034080 (diff)
Fixed deceleration bug for constant acceleration
-rw-r--r--Tonokip_Firmware/Tonokip_Firmware.pde2
1 files changed, 1 insertions, 1 deletions
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;