1900A/1900A - Auton Driving Test.c
void move(int direction, int speed, int distance){
	revolutions = distance/wheelCircumference;
	switch (direction) {

	case forward:
		zeroEncoders();
		while(getDTEncoderAverage() < distance){
			setDriveMotors(127,127,127, 127); //FL, FR, BR, BL
		}
		break;

		case rotateLeft:
		zeroEncoders();
		while(getDTEncoderAverage() < distance){
		setDriveMotors(-127, 127, 127, -127); //FL, FR, BR, BL
		}
		break;

		case rotateRight:
		zeroEncoders();
		while(getDTEncoderAverage() < distance){
		setDriveMotors(127, -127, -127, 127); //FL, FR, BR, BL
		}
		break;

	case backwards:
		zeroEncoders();
		while(getDTEncoderAverage() < distance){
			setDriveMotors(-127, -127, -127, -127); //FL, FR, BR, BL
		}
		break;

	default:
		setDriveMotors(0,0,0,0);

	}
}
//Movement Function 1-forward 2-strafeRight 3-strafeLeft 4-backwards
Movement Function 1-forward 2-strafeRight 3-strafeLeft 4-backwards
Movement Function 1 - forward 2 - strafeRight 3 - strafeLeft 4 - backwards
void move(int direction, int speed, int distance){
	revolutions = distance/wheelCircumference;
	switch (direction) {
	case forward:
		zeroEncoders();
		while(getDTEncoderAverage() < distance){
			setDriveMotors(127,127,127, 127); 
		}
		break;
		case rotateLeft:
		zeroEncoders();
		while(getDTEncoderAverage() < distance){
		setDriveMotors(-127, 127, 127, -127); 
		}
		break;
		case rotateRight:
		zeroEncoders();
		while(getDTEncoderAverage() < distance){
		setDriveMotors(127, -127, -127, 127); 
		}
		break;
	case backwards:
		zeroEncoders();
		while(getDTEncoderAverage() < distance){
			setDriveMotors(-127, -127, -127, -127); 
		}
		break;
	default:
		setDriveMotors(0,0,0,0);
	}
}
void move ( int direction , int speed , int distance ) { revolutions = distance / wheelCircumference ; switch ( direction ) { case forward : zeroEncoders ( ) ; while ( getDTEncoderAverage ( ) < distance ) { setDriveMotors ( 127 , 127 , 127 , 127 ) ; } break ; case rotateLeft : zeroEncoders ( ) ; while ( getDTEncoderAverage ( ) < distance ) { setDriveMotors ( -127 , 127 , 127 , -127 ) ; } break ; case rotateRight : zeroEncoders ( ) ; while ( getDTEncoderAverage ( ) < distance ) { setDriveMotors ( 127 , -127 , -127 , 127 ) ; } break ; case backwards : zeroEncoders ( ) ; while ( getDTEncoderAverage ( ) < distance ) { setDriveMotors ( -127 , -127 , -127 , -127 ) ; } break ; default : setDriveMotors ( 0 , 0 , 0 , 0 ) ; } }
Movement Function 1-forward 2-strafeRight 3-strafeLeft 4-backwards
Movement Function 1 - forward 2 - strafeRight 3 - strafeLeft 4 - backwards
//FL, FR, BR, BL //FL, FR, BR, BL //FL, FR, BR, BL //FL, FR, BR, BL