|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: EasyC: Execute code before autonomous
Quote:
|
|
#2
|
||||
|
||||
|
Re: EasyC: Execute code before autonomous
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
}
}
Last edited by Kingofl337 : 07-01-2007 at 21:29. |
|
#3
|
|||||
|
|||||
|
Re: EasyC: Execute code before autonomous
Excellent. Thanks!
|
|
#4
|
|||||
|
|||||
|
Re: EasyC: Execute code before autonomous
Quote:
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
}
|
|
#5
|
||||
|
||||
|
Re: EasyC: Execute code before autonomous
yeah forgot the ! fixed thanks.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EasyC autonomous modes | TubaMorg | Programming | 25 | 12-04-2006 22:53 |
| EasyC Default Code | Team 1649 | Programming | 13 | 29-01-2006 11:52 |
| Help!!! 979 has no autonomous day before Buckeye | dddriveman | Programming | 11 | 24-03-2004 12:16 |
| Using a switch before autonomous operation | KZos550 | Programming | 11 | 04-02-2003 19:12 |