Robot keeps spinning, Inertial reading shows fine

We were working on our latest robot for Worlds but our autonomous inertial commands aren’t working. This is our current code.

void pre_auton(void) {
  // Initializing Robot Configuration. DO NOT REMOVE!
  vexcodeInit();
  Flywheel.setVelocity(200, percent);
  Manipulators.setVelocity(200, percent);
  Intakes.setVelocity(200, percent);
  Drivetrain.setDriveVelocity(65, percent);
  Drivetrain.setTurnVelocity(40, percent);
    Inertial.resetRotation();
  Brain.Screen.newLine();
    Brain.Screen.print(Inertial.rotation());
    Brain.Screen.newLine();
   while (true) {
Brain.Screen.newLine();
    Brain.Screen.print(Inertial.rotation());
   }
  // All activities that occur before the competition starts
  // Example: clearing encoders, setting servo positions, ...
}
void autonomous(void) {
Inertial.calibrate();
Inertial.resetRotation();
Drivetrain.driveFor(20, inches);
Drivetrain.turn(right,30, vex::velocityUnits::rpm);
waitUntil((Inertial.rotation(degrees) >= 125));

The inertial reading shows fine and adjusts based on position, but even when the number is 125 or more, the robot keeps spinning. Any tips or help? Thanks!

im not sure exactly how waitUntil works, but my guess is you need a lambda rather than just an expression

Thanks for responding, this is our first year with VEX, so we’re not completely sure on all the terminology, but what’s the difference between a lambda and an expression?

Just figured out the problem, we didn’t add

Drivetrain.stop();