void redPost() { setArm(20); intakeSet(127); wait1Msec(750); setArm(5); wait1Msec(500); driveStraight(550); setArm(120); wait1Msec(3000); setLeftTicks(685); SensorValue[lDriveEncoder] = 0; SensorValue[rDriveEncoder] = 0; setRightPo(127); setLeftPo(127); wait1Msec(1500); setRightPo(0); setLeftPo(0); SensorValue[lDriveEncoder] = 0; SensorValue[rDriveEncoder] = 0; driveStraight(-390); setArm(95); wait1Msec(1000); intakeSet(-127); SensorValue[dumpSolenoid] = 1; wait1Msec(1500); SensorValue[dumpSolenoid] = 0; SensorValue[lDriveEncoder] = 0; SensorValue[rDriveEncoder] = 0; driveStraight(-180); wait1Msec(500); setArm(5); }
/* Map buttons on primary joystick */ void buttonMapMain() { intakeSet(vexRT[Btn6U]?100: vexRT[Btn6D]?(-100): 0); if(vexRT[Btn5U]) { driveSetByDistance(170); } else if(vexRT[Btn5D]) { driveSetByDistance(62); } else if(vexRT[Btn7U]) { driveSetByDistance(222); } else if(vexRT[Btn8R]) { StartTask(PinkPanther); } else if(vexRT[Btn8L]) { StartTask(HotlineBling); } else if(vexRT[Btn8D]) { StartTask(Dhoom); }else if(vexRT[Btn8U]) { StartTask(JohnCena); } }