Auto Selection Placement

i have a auto selection program, which uses 2 potentiometers to select the color you are on, and from 3 auto programs for each side, along with selecting skills. it works, and displays, but i don’t know where to put it in the program.(autonomous functions, pre auton, or driver control)
here’s the entire program
void sideSelector(){
if (SensorValue[autoSwitch2]<1400)//blue side
{
side = 1;
}
else if(SensorValue[autoSwitch2]<2800)//red side
{
side = 2;
}
else //skills
{
side = 3;
}
}
void proLCDClear()
{
clearLCDLine(1);
clearLCDLine(0);
}
task chooseAutonomous(){
sideSelector();
switch(side){
case 1://BLUE SIDE AUTONOMI
if(SensorValue[autoSwitch]<1500){
mobileshortblue();
}
else if(SensorValue[autoSwitch]<3000){
mobilelongblueshortred();
}
else{
noneblue();
}
break;
case 2://RED SIDE AUTONOMI
if(SensorValue[autoSwitch]<1500){
mobilelongredshortblue();
}
else if(SensorValue[autoSwitch]<3000){
mobileshortred();
}
else{
nonered();
}
break;
case 3:
skills();
break;
}
}

task autonLED(){
while(true) {
sideSelector();
switch(side){
case 1://RIGHT SIDE AUTON INDICTATOR
SensorValue[auto1]=1;
proLCDClear();
displayLCDCenteredString(0, “Right”);
if(SensorValue[autoSwitch]<1500){
displayLCDCenteredString(1, “Starz”);
SensorValue[auto2]=0;
SensorValue[auto3]=0;
SensorValue[auto4]=1;
}
else if(SensorValue[autoSwitch]<3000){
displayLCDCenteredString(1, “Cube”);
SensorValue[auto2]=0;
SensorValue[auto3]=1;
SensorValue[auto4]=0;
}
else{
displayLCDCenteredString(1, “Pole”);
SensorValue[auto2]=1;
SensorValue[auto3]=0;
SensorValue[auto4]=0;
}
break;
case 2://LEFT SIDE AUTON INDICATOR
SensorValue[auto1]=0;
proLCDClear();
displayLCDCenteredString(0, “Left”);
if(SensorValue[autoSwitch]<1500){
displayLCDCenteredString(1, “Starz”);
SensorValue[auto2]=0;
SensorValue[auto3]=0;
SensorValue[auto4]=1;
}
else if(SensorValue[autoSwitch]<3000){
displayLCDCenteredString(1, “Cube”);
SensorValue[auto2]=0;
SensorValue[auto3]=1;
SensorValue[auto4]=0;
}
else{
displayLCDCenteredString(1, “Pole”);
SensorValue[auto2]=1;
SensorValue[auto3]=0;
SensorValue[auto4]=0;
}
break;
case 3://SKILLS AUTON INDICATOR
proLCDClear();
displayLCDCenteredString(0, “Skillz”);
while(true){
SensorValue[auto1] = 1;
SensorValue[auto2] = 1;
SensorValue[auto3] = 1;
SensorValue[auto4] = 1;
break;
}
}
}
}

If it is just a potentiometer and not an LCD or buttons, i would put it directly in autonomous. If you want RUNNING code for selection, Pre-auton, if you just want to read and go, Auton in fine.

I would suggest placing it in pre-auton with an LED that shows what you selected. That way if you selected the wrong thing by chance, or your pot got bumped, you have time to power down and re-start before auton runs.

If you are using a pot make sure you sample it a number of times to average before using it.