First team commit
Fork of LineFollower by
Diff: LineFollower.cpp
- Revision:
- 11:88aa683f1c94
- Parent:
- 10:a9233fa6240d
--- 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;