예제 #1
0
task autonomous()
{
  // .....................................................................................
  // Insert user code here.
  // .....................................................................................
	lcdClear();
	char* disp = (Program==0?"BLU Auto":Program==1?"RED Auto":Program==2?"BLU Pole":"RED Pole");
	displayLCDCenteredString(0, disp);

	switch(Program)
	{
		case BLU_AUTO:
			autonBluAuto();
			break;
		case RED_AUTO:
			autonRedAuto();
			break;
		case BLU_POLE:
			autonBluPole();
			break;
		case RED_POLE:
			autonRedPole();
			break;
	}

	AutonomousCodePlaceholderForTesting();  // Remove this function call once you have "real" code.
}
task autonomous()
{
  // .....................................................................................
  // Insert user code here.
  // .....................................................................................

	AutonomousCodePlaceholderForTesting();  // Remove this function call once you have "real" code.
}
예제 #3
0
task autonomous()
{
	autonomousStartTime = nSysTime;

	AutonomousCodePlaceholderForTesting();  // Remove this function call once you have "real" code.

	initialize();
	//autonomousRoutines();
}
예제 #4
0
파일: main.c 프로젝트: EastRobotics/2616E
void pre_auton()
{
	bStopTasksBetweenModes = true; // Tasks stop when we need them to. Not doing this can be dangerous.
	bLCDBacklight = true; // Turn our LCD backlight on

	//Reset the motor encoders
	clearDriveEncoders();

	//Setup song
	processSong();

	// Never passing if statement. Lets us get rid of compile warnings so we can focus on the ones we need to see.
	if (false) {
		UserControlCodePlaceholderForTesting();
		AutonomousCodePlaceholderForTesting();
		sensorsErrorEscape(); // Get rid of unused methods for the sensor lib
		// Feel free to add currently un-used methods/tasks here if you're sure they are meant to not be used.
	}
}
예제 #5
0
task autonomous()
{
	// ..........................................................................
	// Insert user code here.
	// ..........................................................................
	slaveMotor(gb2,gb1);
	slaveMotor(gb3, gb2);
	slaveMotor(gb4, gb3);
	bool a = true;
	clearTimer(T1);
	while(a)
	{
		if(time1(T1)<3000)
			cat(-127);
		if(time1(T1)>60000)
			a=false
	}
	// Remove this function call once you have "real" code.
	AutonomousCodePlaceholderForTesting();
}
예제 #6
0
task autonomous()
{


  int Ampharos = -1470;
  int Dragonite = 639;
  int David = -600;

SensorValue[Golem] = 0;
SensorValue[Miltank] = 0;




while(SensorValue[Golem] > Ampharos)
{
  if(SensorValue[Golem] > David)
  {
    motor[port1] = 127; // port 1 and 3 are + for reverse and port 2 and 4 are -.
    motor[port2] = -127;
    motor[port3] = 127;
    motor[port4] = -127;
    motor[port7] = -127; // port 7 and port 8 - to take scoop down.
    motor[port8] = -127;
  }
  else
  {
    motor[port1] = 127;
    motor[port2] = -127;
    motor[port3] = 127;
    motor[port4] = -127;
    motor[port7] = 0;
    motor[port8] = 0;
  }
}


{
  motor[port1] = 0;
  motor[port2] = 0;
  motor[port3] = 0;
  motor[port4] = 0;
}

while(SensorValue[Shedinja] < 470)
{
  motor[port5] = 127;
  motor[port6] = 127;
}

{
  motor[port1] = 0;
  motor[port2] = 0;
  motor[port3] = 0;
  motor[port4] = 0;
  motor[port5] = 0;
  motor[port6] = 0;
  motor[port7] = 0;
  motor[port8] = 0;
  wait1Msec(15000);
}





while(SensorValue[Shedinja] > 50)
{
  motor[port5] = -127;
  motor[port6] = -127;
}


SensorValue[Golem] = 0;
SensorValue[Miltank] = 0;

{
  motor[port1] = 0;
  motor[port2] = 0;
  motor[port3] = 0;
  motor[port4] = 0;
  motor[port5] = 0;
  motor[port6] = 0;
  motor[port7] = 0;
  motor[port8] = 0;
}





  // .....................................................................................
  // Insert user code here.
  // .....................................................................................

	AutonomousCodePlaceholderForTesting();  // Remove this function call once you have "real" code.
}
예제 #7
0
task autonomous()
{
	AutonomousCodePlaceholderForTesting();
}
예제 #8
0
task autonomous()
{
    AutonomousCodePlaceholderForTesting();  // Remove this function call once you have "real" code.
}
task autonomous()
{
	AutonomousCodePlaceholderForTesting(); //keep this line of code
}
예제 #10
0
/////////////////////////////////////////////////////////////////////////////////////////
//
//                          Pre-Autonomous Functions
//
// You may want to perform some actions before the competition starts. Do them in the
// following function.
//
/////////////////////////////////////////////////////////////////////////////////////////
void warningKiller() {
	UserControlCodePlaceholderForTesting();
	AutonomousCodePlaceholderForTesting();
}