Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: kisoken_PenPlotter
Revision 1:15adfb7ee64c, committed 2017-08-03
- Comitter:
- Akito914
- Date:
- Thu Aug 03 12:42:12 2017 +0000
- Parent:
- 0:a7573f3f2207
- Child:
- 2:a43e90cb271c
- Commit message:
- ?????????????????????
Changed in this revision
| trapezoidalMotionCal.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/trapezoidalMotionCal.cpp Thu Aug 03 06:50:03 2017 +0000
+++ b/trapezoidalMotionCal.cpp Thu Aug 03 12:42:12 2017 +0000
@@ -13,10 +13,6 @@
shortMode = 0;
revMode = 0;
- step_accel = (f_max * f_max - f_start * f_start) / (2 * a_up);
- step_decel = (f_stop * f_stop - f_max * f_max) / (2 * a_down);
-
-
}
void trapezoidalMotionCal::setTarg(int32_t targ){
@@ -28,7 +24,9 @@
targSteps *= -1;
}
+ step_accel = (_f_max * _f_max - _f_start * _f_start) / (2 * _a_up);
step_const = (double)targSteps - step_accel - step_decel;
+ step_decel = (_f_stop * _f_stop - _f_max * _f_max) / (2 * _a_down);
if (step_const <= 0) {
shortMode = 1;