Autonomous Gyro Omni Wheel Functions
/*This code will only be able to strafe straight sideways....no fancy movements or anything...for now
It will also be able to turn (normal turning).*/
/*This code (and the above comment) are valid as of May 20, 2007. All major revisions will be added here*/
#include "user_routines.h"
float gyro_heading=(Get_Gyro_Angle()/10);
//This only works at the beginning of Auton period to go straight
void Straight_Driving_Beginning(int str_dir){
/*
When using the seconds function, for the "function" to enter, enter "1" to call upon this function
*/
FR=speed(100);
FL=flip(speeD(100));
if((gyro_heading>str_dir) && (gyro_heading<180)){
FR=blend(FR,speed(8));
FL=blend(FL,speed(-8);
}
if((gyro_heading>str_dir) && (gyro_heading>180) && (gyro_heading<=360)){
/*the above happens because of the 360-0 degree offset. because this code only works at the beginning, the str_dir should
be zero*/
FR=blend(FR,speed(-8));
FL=blend(FL,speed(8));
}
} /*end straight_driving_beginning*/
void Straight_Driving(int input){
/*
When using the seconds function, for the "function" to enter, enter "2" to call upon this function
*/
FR=speed(100);
FL=speed(100);
if(gyro_heading>input){
FR=blend(FR,speed(8));
FL=blend(FL,speed(-8);
}
if(gyro_headinginp){
turnLeft();
}
if(gyro_heading