View Single Post
  #2   Spotlight this post!  
Unread 14-02-2004, 14:52
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: C Programming Question

Quote:
Originally Posted by tophq
Ok, before I begin let me start off by saying that I have checked around to find the answer ot my question and I have not found a suitable answer, this may be due to the lack of my attention span though...lol. Ok my problem is I'm trying to use the trim wheel on the joystick to set the robot into autonomous mode. Now I first added the
Code:
unsigned char wheel_right
to the user_routines.h header file and I still keep getting errors. It says "wheel_right is not defined" when I try to build it. I also tried adding the code directly before the function but when I do that it says I have multiple definitions and it still won't build. Where and how do I need to define and declare my variables. Any help would be greatly appreciated.
The trim wheels are only used to trim the joystick neutral point. The robot controller cannot see the trim values.
Use one of the joystick buttons instead, say p1_sw_top, like:
Code:
if (p1_sw_top)  User_Autonomous_Code
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle