Quote:
Originally Posted by ebernerrd
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.