I have a robot which works fine in user control, but when I switch to a competition template with autonomous and user control I never get to user control. I’m wondering if it’s a firmware/master code issue, because I noticed that Mastercode v.10 is for Pic’s with vexnet upgrades, but I don’t have that upgrade. Could this be a mastercode issue, and if so, where do I get the proper Mastercode? I have RobotC 2.32 which only seems to have v.10 with it. Or is my code missing something? I’ve tried everything i can think of!
#pragma config(Motor, port2, RightWheels, tmotorNormal, openLoop)
#pragma config(Motor, port3, LeftWheels, tmotorNormal, openLoop)
#pragma config(Motor, port5, Claw, tmotorNormal, openLoop)
#pragma config(Motor, port6, Elbow, tmotorNormal, openLoop)
//!!Above Code automatically generated by ‘ROBOTC’ configuration wizard !!//
#pragma platform(VEX)
//Competition Control and Duration Settings
#pragma competitionControl(Competition) // change to OFF to not be in comp mode
#pragma autonomousDuration(20) // 20 second autonomous
#pragma userControlDuration(180) // 2 minute user-control + extra for error
#include “Vex_Competition_Includes.c” //Main competition background code…do not modify!
void pre_auton()
{
// All activities that occur before the competition starts
// Example: clearing encoders, setting servo positions, …
}
task autonomous()
{
motor[port2] = 127;
motor[port3] = 127;
wait1Msec(1500);
motor[port2] = 0; //Motor on port2 stops (power=0)
motor[port3] = 0;//Motor on port3 stops (power=0)
}
task usercontrol()
{
bIfiAutonomousMode = false; //Activates Remote Control Mode
while (true) //Creates an infinite loop
{
motor[port2] = vexRT(Ch2);
motor[port3] = vexRT(Ch3);
motor[Elbow] = vexRT(Ch6);
motor[Claw] = vexRT(Ch5);
}
}