View Single Post
  #21   Spotlight this post!  
Unread 06-04-2006, 17:43
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: EasyC autonomous modes

Quote:
Originally Posted by Dillon Compton
Hmm. I attempted to use the code on the first page, after all the bugs were worked out and all, and it wont display to my userbyte on the OI- any ideas?
Well my final version worked ok so here it is:

Code:
while ( !IsEnabled() )
      {
            p4_trig = GetOIDInput ( 4 , 1 ) ;
            if ( p4_trig )
            {
                  if ( autoProgram < 8 )
                  {
                        autoProgram ++ ;
                  }
                  else
                  {
                        autoProgram = 0 ;
                  }
                  while ( p4_trig )
                  {
                        p4_trig = GetOIDInput ( 4 , 1 ) ;
                  }
            }
            SetUserDisplay ( autoProgram ) ;
      }
Uh, just to ask a dumb question: Did you switch the OI to u-mode? I'm sure you did, just checking though. Also make sure the variable "autoProgram" is set as a global unsigned char.

Last edited by TubaMorg : 06-04-2006 at 17:53.