Quote:
Originally Posted by Kingofl337
You only need to call isEnabled to make sure the while loop ends and you don't get stuck in initialize. Initialize is run every time you reset your robot to calibrate any sensors that may need it.
Code:
void Initialize ( void )
{
while ( IsEnabled() ) // while the robot is not enabled
{
if ( GetOIDInput ( 1 , 1 ) ) // If Trigger is Pulled Go Next Auto
{
automode ++ ;
}
else if ( GetOIDInput ( 1 , 2 ) ) // If Thumb is pushed go prev automode
{
automode -- ;
}
SetUserDisplay ( automode ) ; // send current automode to OI display
}
}
|
Shouldn't that be:
Code:
while ( !IsEnabled() ) // while the robot is not enabled
{
if ( GetOIDInput ( 1 , 1 ) ) // If Trigger is Pulled Go Next Auto
{
automode ++ ;
}
else if ( GetOIDInput ( 1 , 2 ) ) // If Thumb is pushed go prev automode
{
automode -- ;
}
SetUserDisplay ( automode ) ; // send current automode to OI display
}
?