#include “robot-config.h”
int main() {
LeftWheelMotor.spin(directionType ::fwd, 75, velocityUnits ::pct);
RightWheelMotor.spin(directionType ::rev, 75, velocityUnits ::pct);
task ::sleep(800);
LeftWheelMotor.stop(brakeType ::brake);
RightWheelMotor.stop(brakeType ::brake);
task ::sleep(300);
LeftWheelMotor.spin(directionType ::rev,75, velocityUnits ::pct);
RightWheelMotor.spin(directionType ::rev,75, velocityUnits ::pct);
task ::sleep(575);
LeftWheelMotor.stop(brakeType ::brake);
RightWheelMotor.stop(brakeType ::brake);
task ::sleep(300);
LeftWheelMotor.spin(directionType ::fwd,75, velocityUnits ::pct);
RightWheelMotor.spin(directionType ::rev,75, velocityUnits ::pct);
task ::sleep(2900);
LeftWheelMotor.stop(brakeType ::brake);
RightWheelMotor.stop(brakeType ::brake);
}
My autonomous is having trouble working in matches. In practice we can run it without an autonomous switch and it will work. And if we have the autonomous switch plugged in and already running and then we click run on the robot and that works. But if the switch is plugged in and disabled, we click run on the robot, and then we enable autonomous it doesn’t move. This also happens in competition so our autonomous doesn’t work. Can someone please provide guidance.
Thanks.