Revision 6fab3966
ID | 6fab3966a8c664beb8621d6ef145904cceef783a |
Fixed the line following code.
Now works with new units
Fixed a bug with reading the line location, correctly centering the line between -3.5 and 3.5 rather than -4 and 3.
Also fixed a bug caused by overflow in absolute speeds sent to motor control, which fixed bouncing in line following.
scout/libscout/src/LinesensorControl.cpp | ||
---|---|---|
85 | 85 |
return last_ret; |
86 | 86 |
} |
87 | 87 |
|
88 |
double ret_val = last_ret = ((double) weighted_total / total_read) - 4;
|
|
88 |
double ret_val = last_ret = ((double) weighted_total / total_read) - 3.5;
|
|
89 | 89 |
return ret_val; |
90 | 90 |
} |
91 | 91 |
|
Also available in: Unified diff