|
Re: Run Command Once When Trigger is Pressed
Probably already solved, but what I would do is assign a flag to whether the code is required to run. so, when the trigger is pressed (>= .01, maybe), you set the flag to true. the method runs when the method is true, and at the end of the method, it sets the flag to false. Granted this is using SimpleRobot template.
__________________
Code:
while (life){
frcObsession = true;
obs.ProgramAndObsess();
}
if (!life) life = true;
|