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 PsiSwarm-flockingAddedBluetooth by
Diff: PsiSwarm/motors.cpp
- Revision:
- 13:f5994956b1ba
- Parent:
- 9:085e090e1ec1
--- a/PsiSwarm/motors.cpp Tue Oct 27 13:03:10 2015 +0000 +++ b/PsiSwarm/motors.cpp Tue Oct 27 22:49:41 2015 +0000 @@ -114,6 +114,12 @@ time_based_action_timeout.attach_us(&IF_end_time_based_action,microseconds); } +//Returns the limit of degrees available to turn in given time +float get_maximum_turn_angle(int microseconds){ + //We can turn at about 270 degrees per second at full speed + return (microseconds * 0.00027); +} + //Return the time in microseconds that performing the turn will take int get_time_based_turn_time(float speed, float degrees) {