|
Re: Programming Joystick Buttons to toggle a motor on and off
no, it is in an if else
if it was
Code:
if (btn3state)
{
jag3.Set(0.5);
btn3state=false;
}
else if (!btn3state)//always execute
{
jag3.Set(0.0);
btn3state=true;
}
it would be buggy, but if "if" is true, "else" is not executed
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
|