task autonomous() { // ..................................................................................... // Insert user code here. // ..................................................................................... progSkills(); //autonLocation(); // Remove this function call once you have "real" code. }
task usercontrol() { // User control code here, inside the loop bool arcade = false; while (true) { // This is the main execution loop for the user control program. Each time through the loop // your program should update motor + servo values based on feedback from the joysticks. // ..................................................................................... // Insert user code here. This is where you use the joystick values to update your motors, etc. // ..................................................................................... if (vexRT[Btn7U] == 1) { progSkills(); } if (vexRT[Btn8U] == 1) { arcade = true; } else if (vexRT[Btn8D] == 1) { arcade = false; } if (arcade == true) { motor[leftBack] = cubicMap(vexRT[Ch3] + vexRT[Ch1]); motor[leftFront] = cubicMap(vexRT[Ch3] + vexRT[Ch1]); motor[rightBack] = cubicMap(vexRT[Ch3] - vexRT[Ch1]); motor[rightFront] = cubicMap(vexRT[Ch3] - vexRT[Ch1]); } else { motor[leftBack] = vexRT[Ch3]; motor[leftFront] = vexRT[Ch3]; motor[rightBack] = vexRT[Ch2]; motor[rightFront] = vexRT[Ch2]; } if (abs(vexRT[Ch2Xmtr2]) > 10) { motor[leftArmBottom] = cubicMap(vexRT[Ch2Xmtr2]); motor[leftArmTop] = cubicMap(vexRT[Ch2Xmtr2]); motor[rightArmBottom] = cubicMap(vexRT[Ch2Xmtr2]); motor[rightArmTop] = cubicMap(vexRT[Ch2Xmtr2]); } else if (vexRT[Btn6U] == 1) { motor[leftArmBottom] = 127; motor[leftArmTop] = 127; motor[rightArmBottom] = 127; motor[rightArmTop] = 127; } else if (vexRT[Btn6D] == 1) { motor[leftArmBottom] = -127; motor[leftArmTop] = -127; motor[rightArmBottom] = -127; motor[rightArmTop] = -127; } else { motor[leftArmBottom] = 0; motor[leftArmTop] = 0; motor[rightArmBottom] = 0; motor[rightArmTop] = 0; } if (abs(vexRT[Ch3Xmtr2]) > 10) { motor[intakeLeft] = vexRT[Ch3Xmtr2]; motor[intakeRight] = vexRT[Ch3Xmtr2]; } else if (vexRT[Btn5U] == 1) { motor[intakeLeft] = 127; motor[intakeRight] = 127; } else if (vexRT[Btn5D] == 1) { motor[intakeLeft] = -127; motor[intakeRight] = -127; } } }
task usercontrol() { progSkills(); }
task autonomous() { progSkills(); }