diff --git a/src/robot.cpp b/src/robot.cpp index 61d712e..ca34c02 100644 --- a/src/robot.cpp +++ b/src/robot.cpp @@ -97,7 +97,7 @@ void Robot::EnterLineFollowing(float speed) robotState = ROBOT_LINING; } -int lineLostFrames = 7; +int lineLostFrames = 24; void Robot::LineFollowingUpdate(void) { @@ -129,10 +129,14 @@ void Robot::LineFollowingUpdate(void) rollingTurnRate = 0; turnEffort = 0; speed = 0; + chassis.Stop(); + return; + } else { + speed *= 0.97; } } else { - lineLostFrames = 7; + lineLostFrames = 24; } chassis.SetTwist(speed, turnEffort);