Programming Using A Toggle Function

Don’t create tasks in a while loop, this will constantly keep recreating them.

//Driver Control Code
void usercontrol(void) {
    
  while (1) {

task runMainDriveTask (runMainDrive);

task runMainLiftTask (runMainLift);

task runGoalLiftTask (runGoalLift);

task toggleConveyerTask (toggleConveyer);

task toggleClampTask (toggleClamp);

  //Vex Wait
  wait (20, msec); 
  }
}

also, have a read through this for some advice on task management when using competition control.