View Single Post
  #6   Spotlight this post!  
Unread 08-02-2017, 15:01
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,770
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Command stops my teleop process

Quote:
Originally Posted by ebernerrd View Post
If I place a return statement at the end of the execute statement, should I be okay? Because at the moment I have something like this
Code:
TeleopDefault::Initialize(){
//some code
     button->WhenPressed(new DropGear());
     button->WhenReleased(this);
}
This almost works for now. I will look into it a bit further.
I believe he was referring to a loop in the DropGear command initializer or execute method. These methods should return quickly (milliseconds or less), not have the loop that goes through the entire process of dropping a gear internal to the command. Let the command based robot infrastructure do that.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote