View Single Post
  #2   Spotlight this post!  
Unread 10-07-2008, 21:36
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Detecting Hybrid \ Teleoperated

From what you say, I think the easiest thing to do is place any shared code into a function, then call that function from both the teleop and hybrid loops. If you need to, you could pass hybrid or teleop as a param to the function.

If you have other plans, you can use these functions/variables to get state info.

In EasyC

Code:
IsEnabled(); //In menu as Controller state
IsAutonomous(); //In menu as Competition state
In MPLab

Code:
autonomous_mode; //Defined in ifi_defaults.h
//For disabled there are previous discussions.
__________________
Eric Haskins KC9JVH