View Single Post
  #2   Spotlight this post!  
Unread 19-02-2007, 00:01
GuitarManiac511's Avatar
GuitarManiac511 GuitarManiac511 is offline
Programmer
AKA: Joshua Miller
FRC #1959 (Aye Robot)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Columbia, SC
Posts: 3
GuitarManiac511 is an unknown quantity at this point
Send a message via AIM to GuitarManiac511 Send a message via MSN to GuitarManiac511 Send a message via Yahoo to GuitarManiac511
Re: Need pnuematics Idea Critique please help!

To capture the press event, you need one global variable and another var that can be local or global (doesn't matter). For my example, I will use the trigger of joystick on port 3. the [] means to use a block. I may not use the correct names for them, but you should get the gist of it...

Global:
int TrigWas;

Local:
int TrigIs;

...
TrigIs = [IOAnalog(3, 1)];
if (!TrigWas & TrigIs)
{
// Trigger was pressed...
}
TrigWas = TrigIs;
...


As for the rest of the coding, I'm not sure what your trying to do...