View Single Post
  #3   Spotlight this post!  
Unread 10-07-2008, 21:38
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 685
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
Re: Detecting Hybrid \ Teleoperated

Not that I'll have much of an answer, but the first question that will come to mind from everyone here is what programming/compiler are you using, and what version. MPLAB has two "out of the box" versions by Kevin Watson (Kevin.org -- whoa! New picture Kevin!), and Easy C. Both of them (if I remember correctly: it's been a couple of months from robo-programming) keep the hybrid/teleop mode switch out of the hands of the programmer and jumps to their respective routines and you go from there. For Kevin's 2007-and-earlier MPLAB version, you can see the switch in the main.c routine. But I wouldn't fiddle with it unless you know what you're doing.

Looking over your question again, if you want to use the "same code" for both modes, if that is what you're asking: Hybrid and teleop start in different routines. Can they not call the same routine(s) from there? And as one uses joysticks and the other (presumably) does some program-operated thinking, the stuff that is different will be in their own starting routine before or after they call the common routine(s).

Of course, this is all changing for 2009 as there is a new controller and new software coming out (hopefully before Kickoff ).

And naturally, Eric got in ahead of me, even if you weren't there a second ago!

Last edited by Roger : 10-07-2008 at 21:42. Reason: Shake my puny little fist at Eric!