View Single Post
  #2   Spotlight this post!  
Unread 01-12-2006, 17:11
galewind's Avatar
galewind galewind is offline
... more like a temperate breeze
AKA: Chris Gregory
FRC #1089 (Team Mercury)
Team Role: Teacher
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Hightstown, NJ
Posts: 410
galewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond reputegalewind has a reputation beyond repute
Send a message via AIM to galewind
Re: Auto Mode!!! WHOA...what tha?

as an aside, there's a difference between DECLARING a variable and DEFINING it.

As Alan stated, pwm01 and p1_y are all defined in ifi_aliases.h

But defining a value is not the same as declaring it. Defining uses the assignment operator (=).

Additionally, the default code (that includes the camera code, at any rate), has a couple of lines in the User_Autonomous_Routines() function before the autonomous mode loop that effectively does initialize all of the pwm's and relays to 0. It effectively reads:

pwm01 = pwm02 = pwm03 = ... = 127;
relay1_fwd = relay1_rev = ... = 0;

Then inside of the autonomous loop (where the getdata and putdata lines are located), you would set your values for pwms inside of there.

And as stated, do NOT attempt to redeclare them, as they've already been #define 'd in ifi_aliases.h
__________________
Chris G
Advisor, Team Mercury (1089), Hightstown High School