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: SDSK.h
- Revision:
- 1:491a39c644b1
- Parent:
- 0:913deac5f975
- Child:
- 2:ea603e66a32e
diff -r 913deac5f975 -r 491a39c644b1 SDSK.h
--- a/SDSK.h Thu Feb 01 19:06:08 2018 +0000
+++ b/SDSK.h Thu Apr 05 19:12:24 2018 +0000
@@ -6,28 +6,20 @@
class SDSK
{
public:
- SDSK(PinName _pin_step, PinName _pin_dir, uint32_t _steps_per_rev=51200, double _max_acc=200, double _max_vel=180, uint32_t _min_us_step_pulse=4, bool _positive_is_ccw=true);
+ SDSK(PinName _pin_step, PinName _pin_dir, uint32_t _steps_per_rev=51200, double _max_acc=360, double _max_vel=180, uint32_t _min_us_step_pulse=4, bool _positive_is_ccw=true);
void move(double target_angle);
-
void reverse();
void zero();
void set_max_acc(double _max_acc);
void set_max_vel(double _max_vel);
- void take_step();
-
- //void set_direction(bool cw);
+ void take_step();
private:
DigitalOut step;
DigitalOut dir;
-
- Timer profile_time;
-
- Serial pc;
-
bool positive_is_ccw; // changes to -1 if untrue
double max_acc;
@@ -39,6 +31,9 @@
uint32_t steps_per_rev;
double steps_per_angle;
- void delay_for_velocity(double velocity_steps);
+ Serial pc;
+
+ Timer profile_time;
+
};
#endif