Thread: disabledInit()
View Single Post
  #8   Spotlight this post!  
Unread 15-03-2014, 02:04
rrossbach rrossbach is offline
Registered User
AKA: Ron R
FRC #2607 (RoboVikings)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2008
Location: Warrington PA
Posts: 90
rrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to behold
Re: disabledInit()

Kevin -
It's important to be clear and precise so that incorrect information isn't propagated.

Maybe I'm misunderstanding, but your posts seem to be teaching others that it is impossible in our robot code to distinguish between AutoDisabled and TeleopDisabled.

If that's what you're trying to convey, it is incorrect.

The WPI framework (at least in C/C++ and Java) provides the ability to distinguish between those "states". The following Java snippet will display different messages to the console depending on whether you're in AutoDisabled, TeleopDisabled, or TestDisabled. C/C++ is similar, just with slightly different syntax.

Code:
public void disabledPeriodic() {
if (isAutonomous()) System.out.println("AutoDisabled"); if (isOperatorControl()) System.out.println("TeleopDisabled"); if (isTest()) System.out.println("TestDisabled");
}