Strange problem that I have never seen. A program is set to run its motors at 60, under autonomous control. When we put it into a regular RobotC file, it will run at 60. If we put the same file into the VEX competition template, it will run the motors at 127. We see this thru the motor debug window.
This wasn’t the case yesterday, as everything on the computer and robot ran as expected. I have done a master firmware download, followed by the RobotC firmware. This does not affect the outcome.
What is the point of the while loop? It is waiting for the timer to complete 1500 ms but the first wait1Msec is 1500 ms. Once it runs the series of commands the timer will be way past 1500 so essentially you are always running the while loop once. No different then not having the while loop.
I am also concerned that there are not any pauses in between the direction changes. Changing directions from -60 to 60 can be tough on a 393 motor.
motor(Right) = -60;
motor(Left) = 60;
wait1Msec(500);
//whew - Let me stop before changing direction.
motor(Right) = 0;
motor(Left) = 0;
wait1Msec(1000);
motor(Right) = 60;
motor(Left) = 60;
wait1Msec(2000);
I don’t see what could be causing the 127 speed issue. Could you post all of the code from that competition file? Are the #pragma statements at the very top?