Well sometimes when I run my program, it doesn’t run correctly and seems to mix up the order of my programs. I have no idea how to fix it, so I’m starting with changing my technique to see if that helps
At our first tournament, we ran the program (7 cube) before a match, and it worked fine. We went to the match and used it, but it drove straight into the other teams side, disqualifying us for autonomous. The next practice I thought I figured it out. I re-downloaded the program before every run, and it seemed to work. Then, last tournament, the problem happened again but luckily off field. I had even re-downloaded it and everything!
I don’t know anything about how your auton is supposed to work but if you don’t figure it out an idea would be to add kill timers so that you don’t disqualify yourself https://renegaderobotics.org/the-kill-timer/
Thanks for your help. Do you know how to write one in VEXcode text? Would an if statement work? if drivetrain runs for more than certain amount of seconds then stop autonomous?
Direction Type is either fwd or rev, just like in motor.spin(). Rotation is the number of units moved, and rotationUnits is the unit to move in. I use deg (degrees), but any of the three listed on the vcs documentation can be used: VCS API Reference.
Heres an example of what I use for my drive train:
// Causes the robot to drive fowards x degrees at y velocity..
void forward(int velocity, int degrees)
{
// Sets the velocity of the drive train motors.
setVelocity(velocity);
DriveFR.rotateFor(degrees, deg, false);
DriveBR.rotateFor(degrees, deg, false);
DriveFL.rotateFor(degrees, deg, false);
DriveBL.rotateFor(degrees, deg, true);
}