View Single Post
  #12   Spotlight this post!  
Unread 13-06-2010, 19:21
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Arcade Drive Troubles in Autonomous

Quote:
Originally Posted by Tanner View Post
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);
Reply With Quote