P loop timeout

I am not sure estimating the total time a step should take makes sense for a simple P loop.

I think the better approach here would be to pass user specified hard time limit to each autonomous step and then exit PID loop based on that. For example:

void drive(int leftSideDistance, int rightSideDistance, int timeLimit_msec)
{
   uint32_t startTime = vex::timer::system();

   while(1)  // main P controller loop
   {
     if( abs( startTime - vex::timer::system() ) > timeLimit_msec )
         break; // on time limit exceeded ; also may return false
     ... // do PID thing
     if( fabs(errorLeftSide) < threshold &&
         fabs(errorRightSide) < threshold )
         break; // on reaching the target ; also may return true
   }
}

void autonomous()
{
   drive(100,100, 2000); // drive forward, with 2 sec time limit
   drive(-50,+50, 1000); // turn left, with 1 sec time limit
   ...
}

See this topic for more information: Exiting a PID loop - #31 by technik3k
VEX Help

Then you may get fancy and return true/false from drive function to indicate success of reaching the goal.