My raw autonomous code wouldn't be much use to you, as its deeply integrated in our system and would be difficult to read if you don't know what everything does. But here's the basic idea:
Code:
if (leftSensorTripped) {
robotDrive->TankDrive(0.7, 0.8);
} else if (rightSensorTripped) {
robotDrive->TankDrive(0.8, 0.7);
} else {
robotDrive->TankDrive(0.7, 0.7);
}
This will gradually get your robot back on the line without overcorrecting. Obviously this is oversimplified and you'll need to adapt it to your bot, but this shows the basic idea. Note that this will not work well in the Y (middle autonomous) as you need a much sharper turn at the corner. For that you need to make a sharper turn.