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.
Diff: LinearMotion.h
- Revision:
- 1:cf60b60a1b5b
- Parent:
- 0:3058939fa37c
--- a/LinearMotion.h Sat Apr 28 21:08:58 2012 +0000
+++ b/LinearMotion.h Fri May 04 06:25:41 2012 +0000
@@ -70,6 +70,14 @@
* @param bool solenoidOn Whether to have the solenoid on
*/
void interpolateSquare(Vector basePos, Vector heightPos, int maxSpeed, bool solenoidOn);
+
+ /** Set various settings for how we do linear motion
+ *
+ * @param long steps_per_pixel The number of steps to go per pixel
+ * @param long initial_delay The initial speed for linear acceleration
+ * @param long step_buffer steps_per_pixel/step_buffer is the size of the gap on either side of a pixel
+ */
+ void updateSettings(long steps_per_pixel, long initial_delay, long step_buffer);
private:
void doLinearSideways(Vector delta, Vector nextRow, Stepper ** stepMotor, int maxSpeed, bool solenoidOn);
@@ -83,6 +91,11 @@
volatile bool * _paused;
volatile bool * _stopped;
bool _z, _z_slantways;
+
+ long _steps_per_pixel;
+ long _z_steps_per_pixel;
+ long _step_buffer; // Make a gap of _steps_per_pixel/_step_buffer between each pixel
+ long _initial_delay; // in us
};
#endif
\ No newline at end of file