Hi is anyone else having an issue with VCS. My programs will no longer save. Its a basic code to show opening and closing the claw in C++. Thanks
#include “robot-config.h”
vex::directionType reverse = vex::directionType::rev;
vex::directionType forward = vex::directionType::fwd;
vex::rotationUnits rotations = vex::rotationUnits::rev;
int main() {
int RhowMany = 1;
int FhowMany = -1;
//testing to see if the claw motor will open
//while(true) { turn on to keep motor running in a constant loop
ClawMotor.spin(reverse); //opens the claw
vex::task::sleep(200); //take a nap
while(ClawMotor.velocity(rpm) < 0) { } //stops the motor on resistance
ClawMotor.stop(brakeType::coast); //motor is opening
//brakeTypes: Coast - stops the motor and do nothing
// Brake - brake - short the wires together but don’t send any additional electricity into the system
// hold - actively use PID to maintain the set position
vex::task::sleep(1000);
ClawMotor.spin(forward);
vex::task::sleep(200);
while(ClawMotor.velocity(rpm) > 0) { }
ClawMotor.stop(brakeType::hold);
//} delete this to complete loop
//Testing the wheels(this shows that other coade can run with claw)
LeftMotor.startRotateFor(FhowMany, rotations);
RightMotor.rotateFor(FhowMany, rotations);
vex::task::sleep(1000);
LeftMotor.startRotateFor(RhowMany, rotations);
RightMotor.rotateFor(RhowMany, rotations);
}