2018/testing-code/MecanumStrafeTest.c
// Uses the mecanumDrive() function to drive in set patterns, testing whether everything was wired correctly.
//
// Remember that this function provides instantaneous motion, and must be
// called in a loop to take place continuously.
//
// Arguments:
// - periodLengthMilliseconds: The duration of the programmed cycle of behavior.
//   Must be less than 32,767 (the maximum duration of the vex timers.)
//
// Return values:
// - True if we've reached the end of our cycle, false otherwise.  The cycle
//   will repeat itself again naturally unless you stop calling autonomousTest().

Uses the mecanumDrive() function to drive in set patterns, testing whether everything was wired correctly.
Remember that this function provides instantaneous motion, and must be
called in a loop to take place continuously.

The duration of the programmed cycle of behavior.
Must be less than 32,767 (the maximum duration of the vex timers.)

Return values:
True if we've reached the end of our cycle, false otherwise.  The cycle
will repeat itself again naturally unless you stop calling autonomousTest().
Uses the mecanumDrive () function to drive in set patterns testing whether everything was wired correctly . Remember that this function provides instantaneous motion and must be called in a loop to take place continuously . The duration of the programmed cycle of behavior . Must be less than 32 767 ( the maximum duration of the vex timers . ) Return values : True if we ' ve reached the end of our cycle false otherwise . The cycle will repeat itself again naturally unless you stop calling autonomousTest () .
bool autonomousTest(int periodLengthMilliseconds) {
	float milliseconds = time1[timer1];
	if (milliseconds > periodLengthMilliseconds) {
		clearTimer(timer1);
		milliseconds = 0;
	}
	const float L = periodLengthMilliseconds;
	if (milliseconds >= 0.0 * L && milliseconds < 0.2 * L) {
		mecanumDrive(0, 127, 0);
		} else if (milliseconds >= 0.2 * L && milliseconds < 0.4 * L) {
		mecanumDrive(127, 0, 0);
		} else if (milliseconds >= 0.4 * L && milliseconds < 0.6 * L) {
		mecanumDrive(0, -127, 0);
		} else if (milliseconds >= 0.6 * L && milliseconds < 0.8 * L) {
		mecanumDrive(-127, 0, 0);
		} else {
		mecanumDrive(0, 0, 0);
		return true;
	}
	return false;
}
bool autonomousTest ( int periodLengthMilliseconds ) { float milliseconds = time1 [ timer1 ] ; if ( milliseconds > periodLengthMilliseconds ) { clearTimer ( timer1 ) ; milliseconds = 0 ; } const float L = periodLengthMilliseconds ; if ( milliseconds >= 0.0 * L && milliseconds < 0.2 * L ) { mecanumDrive ( 0 , 127 , 0 ) ; } else if ( milliseconds >= 0.2 * L && milliseconds < 0.4 * L ) { mecanumDrive ( 127 , 0 , 0 ) ; } else if ( milliseconds >= 0.4 * L && milliseconds < 0.6 * L ) { mecanumDrive ( 0 , -127 , 0 ) ; } else if ( milliseconds >= 0.6 * L && milliseconds < 0.8 * L ) { mecanumDrive ( -127 , 0 , 0 ) ; } else { mecanumDrive ( 0 , 0 , 0 ) ; return true ; } return false ; }
Uses the mecanumDrive() function to drive in set patterns, testing whether everything was wired correctly.
Uses the mecanumDrive () function to drive in set patterns testing whether everything was wired correctly .
// Drive forward.
 // Drive right.
 // Drive backward.
 // Drive left.
 // Stop.
