Bluetooth communication for flocking.
Fork of BeautifulMemeProject by
Diff: PsiSwarm/motors.cpp
- Revision:
- 13:f5994956b1ba
- Parent:
- 9:085e090e1ec1
diff -r daa53285b6e4 -r f5994956b1ba PsiSwarm/motors.cpp --- 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) {