Pros, motor.move_relative moves motor indefinitely

Hey all, I am trying to make a function that moves the bot a certain amount of inches in a specified direction, but instead of moving (for example) 24 inches, the motors spin indefinitely. Heres the function:

void driveDist(float dist, int speed){ //IMPORTANT, Distance in Inches
        dist = ((dist / 12.56) * 360);    //Converts desired inches into degrees (12.57 is circumference of wheel)

	left_drive.move_relative(dist, speed);
	right_drive.move_relative(dist, speed);

I am just calling the function in autonomous.cpp like this:

driveDist(24, 70);

Instead of moving around 687.3 degrees, it just moves until the auton has finished, which is significantly more than 600 degrees.

I’ve tried running the code that you gave in both the autonomous and initialize functions with the latest PROS kernel, and I’m unable to reproduce the issue you’re describing. Is your


call the only one in your autonomous file?

I only have the 1 function called, but I tried it again (with no change) an hour ago and it seemed to work as intended, but Im afraid it might happen again. Could it have been a low battery issue as the battery I used the time before was only around 25%, and is 25% now.

a variable in my function was evaluating to 0 because it was an rounding from .25 to 0