First team commit
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;