Quote:
Originally Posted by Tanner
How would I protect the function from reentry? A google search on the topic didn't bring up anything other than NASA links.
|
It's pretty easy. Here's some pseudocode:
Code:
Declare a static boolean within the method, say "kicker_busy".
if kicker_busy exit;
kicker_busy=1;
// put your code here. It's now protected from re-entry.
kicker_busy=0;
//return
But before you do that, please see what happens when you remove everything except
drivetrain->ArcadeDrive(autonomousForwardPower, 0.0);