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.
Fork of MotorLib by
Diff: motor.h
- Revision:
- 11:25d26c72a2f7
- Parent:
- 10:1df5a7a265e8
- Child:
- 13:4563244c4071
--- a/motor.h Thu Jul 27 07:25:47 2017 +0000
+++ b/motor.h Thu Jul 27 21:28:22 2017 +0000
@@ -5,7 +5,7 @@
#include "mbed.h"
-#define MOTOR_STEP_TIME_MIN 1
+#define MOTOR_STEP_TIME_MIN 700
#define MOTOR_STEP_TIME_DEFAULT 5000
#define MOTOR_TICKS_FOR_A_TURN 4096
@@ -89,17 +89,14 @@
int MotorIndex; // --- Motor Variable
- bool init;
+ bool init;
Ticker MotorSystemTick; // System Callback for Motor
timestamp_t MotorStepTime; // Time in µs for one motor step
uint32_t MotorFullTurn; // Number of step for a complete turn
- // uint32_t NumWires; // Number of Wires
int32_t NumSteps; // Number of Steps = NumWire * MotorFullTurn
Callback<void()> _callback;
- void (*motorCallback)();
bool itOnStop;
- bool toremove;
};
#endif
\ No newline at end of file
