#include "FRC_Comp_Include.c"

void Initialization()
{
	bMotorReflected[port2] = true;
	frcDigitalIODirection[pio1] = dirInput;
}

task Autonomous()
{

	// Go Forward
	while(frcDigitalIOValue[pio1] == 0)
	{
	motor[port1] = 127; //Port 1 is the left motor
	motor[port2] = 127; //Port 2 is the right motor
  	}

	// Turn Left
	motor[port1] = 0;
	motor[port2] = 127;
	wait1Msec(500);

	// Turn off motors
	while(frcDigitalIOValue[pio1] == 0)
	{
	motor[port1] = 127; //Port 1 is the left motor
	motor[port2] = 127; //Port 2 is the right motor
  	}
}

task Human_Control()
{
	while(true)
	{
		motor[port1] = frcRF[p1_y];
		motor[port2] = frcRF[p2_y];

		if(frcOIJoystickButtons[oiButtonPort1Button1] == 1)
		{
		  motor[port3] = 50;
		}
		else
		{
		  motor[port3] = 0;
		}



	}
}
