Trouble with startRotateFor and rotateFor

I am very new to C++ so please talk to me like I am a neanderthal. I am trying to make my first autonomous code, but I am experiencing problems with the startRotateFor and rotateFor functions. When I run the autonomous, the motors won’t start spinning. The program runs fine, I used some print functions and they get printed to the Brain’s screen but it acts as if the rotateFor isn’t even there.
Here is a pastebin link to my code:
https://pastebin.com/gcZNEDyA

Any function calls that are not seen in the pastebin are on a different cpp file.

lets examine the code

  float inchesPerDegree = WHEEL_CIRCUMFERENCE;
  float degrees = inches / inchesPerDegree;
 
  LeftMotor.startRotateFor((degrees * GEAR_RATIO), vex::rotationUnits::deg, AUTON_DRIVE_PCT, vex::velocityUnits::pct);

WHEEL_CIRCUMFERENCE is 12.96 and inches is passed as 24. so degrees is 1.85. That’s not much rotation, you probably would not even see it.

what you want is revolutions in that instance.

6 Likes