Quote:
Originally Posted by rrossbach
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"); }
|
I believe what NotInControl is trying to say (correct me if I'm wrong) is that there are 2 SETS of states for the robot.
The first being: Autonomous/OperatorControl/Test
and the second being: Disabled/Enabled
So if the robot is Disabled it will run disabledInit() and disabledPeriodic() regardless of the state of Autonomous/OperatorControl/Test.
TBH, I think you all are arguing semantics. But that is just mu opinion.
