/*********************************************************************************************************************************
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////// Competition PROGRAM HERE ///////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
**********************************************************************************************************************************/
task autonomous()
{
	while(true)
	{
		if(SensorValue[redWaitingButton])
		{
			if(SensorValue[AutonSelect] < ALEX)
				Alex();
			else if(SensorValue[AutonSelect] < UDIT)
				redUdit();
			else if(SensorValue[AutonSelect] < DEVANSH)
				redDevansh();
			else{}
			break;
		} // end if
		else if(SensorValue[blueWaitingButton])
		{
			if(SensorValue[AutonSelect] < ALEX)
				Alex();
			else if(SensorValue[AutonSelect] < UDIT)
				blueUdit();
			else if(SensorValue[AutonSelect] < DEVANSH)
				blueDevansh();
			else{}
			break;
		} // end else if
	} // end while
} //end auton task
Exemple #2
0
task autonomous()
{
	deploy();
	while(true)
	{
		if(SensorValue[waitingButtonRed] == 1)
		{
			if(SensorValue[AutonSelect] < ALEX)
			{
				Alex(); // 15 middle zone
			}
			else if(SensorValue[AutonSelect] < UDIT)
			{
				RedUdit(); // projected 30 pts + spare change (6-14)
			}
			else if(SensorValue[AutonSelect] < DEVANSH)
			{
				skills(); // safe 3-6
		 	}
			else{}
			break;
		}
		else if(SensorValue[waitingButtonBlue] == 1)
		{
			if(SensorValue[AutonSelect] < ALEX)
			  Alex();
			else if(SensorValue[AutonSelect] < UDIT)
				blueUdit();
			else if(SensorValue[AutonSelect] < DEVANSH)
				skills();
			else{}
			break;
		}
	}
}
void autonTest4()
{
	blueUdit();
}