View Single Post
  #2   Spotlight this post!  
Unread 24-01-2008, 13:49
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: New C18 3.0+ Compatible FRC Code

Quote:
Originally Posted by PhilBot View Post
No wonder my bot corrected in the wrong direction on evey second lap
Just to make sure we didn't have odd problems like this, our code looked something like

Code:
void Read_Yaw(void) {
  phi=Get_Gyro_Angle();
  phi=phi%6283L;  // Avoid unneccesary wraparound
}