View Single Post
  #7   Spotlight this post!  
Unread 25-02-2004, 16:43
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Button Programing

Quote:
Originally Posted by Phil_Lutz
We coded buttons/triggers to only activate on release, that helps control the longggggggggg button push
Double clever!

[edit]
My code (With suggestion):
Code:
//...
//Init Relays
relay1_fwd = 1;
relay1_rev = 0;
//...
static char SwitchVals = 0;
if (OI_Switch)
{
 SwitchVals = 1;
}

if (!OI_Switch & SwitchVals)
{
 relay1_fwd = !relay1_fwd;
 relay1_rev = !relay1_rev;
 SwitchVals = 0;
}
Of course, you still have to integrate it.

Last edited by Astronouth7303 : 25-02-2004 at 16:52.