#ifndef _UMAIN_H_
#define _UMAIN_H_

// Function prototypes
void startup(void);
void stop(void);
void game_play(void);
void drive(int lspeed, int rspeed);
void set_scale(int *el, int *er);
void drive_dist(int distance);
void drive_dist_back(int distance);
void gyro_start(void);
void turn(float radians);
void reset_encoders(void); //no longer necessary
void music(void); //not used
int which_direction(void);
void init_find_wall(int direction);
float gyro_get_radians();
void close_claw();
void open_claw();
void lift_up();
void lift_down();
int where_the_fuck_is_the_line(int sensor); //not used
bool check_ir(int sensor);
bool hit_wall(void);
bool haz_ball (void) ; //not used
void straighten_out(void);
void go_after_small_balls(void);
void go_after_large_ball4(void);
void go_after_large_ball5(void);
void block_flagbox(void);
float distance_get_inches(void); //not used
void assume_the_recovery_position(void); //not used
int gyro_reading(void);
void orient_east(void); //not used
void orient_south(void); //not used
void orient_north(void); //not used
void we_crashed(void); //not used
void recover_state(void); //not used
void drive_dist_no_stop(int distance);
void turn_no_stop(float radians);
void drive_dist_at(int distance, int speed);
float EncoderDifferential(); // Defined to be Right - Left
void ForwardApplyMV(float);
void LeftApplyMV(float);
void RightApplyMV(float);
float BoundedVelocity(float);
void ResetEncoders();
void CoastMotors();
void CoastMotor(uint8_t);
void TurnApplyMV(float MV);
int accelerate(int current_speed, int target_speed);
void drive_dist_no_stop_at_no_reset(int distance, int speed);
void turn_test(void); //used for calibration

//functions in oops
void are_we_crashed(void);




// Inline functions
inline int max(int a, int b)
{
  return a > b ? a : b;
}

#endif

