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 LineFollower by
Revision 11:88aa683f1c94, committed 2014-03-24
- Comitter:
- blu12758
- Date:
- Mon Mar 24 00:49:23 2014 +0000
- Parent:
- 10:a9233fa6240d
- Commit message:
- yeah
Changed in this revision
LineFollower.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r a9233fa6240d -r 88aa683f1c94 LineFollower.cpp --- a/LineFollower.cpp Mon Mar 24 00:44:31 2014 +0000 +++ b/LineFollower.cpp Mon Mar 24 00:49:23 2014 +0000 @@ -35,7 +35,7 @@ sum += (i+1); count++; } - if(count == 0) return 0; + if(count == 0 || count == 8) return -1; float center = sum/count; //Change the sp_adj_mult to change how drastic your adjustments are. 0-1 float speed_adjust = sp_adj_mult*(center-4.5)/(3.5)*maxspeed;