View Single Post
  #48   Spotlight this post!  
Unread 16-03-2004, 16:10
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: quick question: TIMERS

Quote:
Originally Posted by Xufer
so it would be like:

#define digin10old

then later on ....

digin10old = (rc_dig_in10)
putdata()
No, it would not be like that, for a whole bunch of reasons.

Contrary to an earlier post, the RC inputs such as rc_dig_in10 do work during autonomous mode, so there's no reason to do it this way. The advice to save the values for later use applies only to OI inputs (knobs and switches, mostly) that you want to use to configure autonomous operation.

Also, variables in c aren't declared using #define statements. The proper syntax is not trivial, but it is not important here, since you don't need to use a variable for this purpose.