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.