|
Re: Multiple timer objects / deleted timers
In addition to Joe's point the constructor will only be called once. With that in mind you will likely need to move the following out of the constructor and into the initialize method.
timer->Reset();
timer->Start();
...
isDone = false;
This will cause them to execute each time the command is ran instead of just once when the robot is started up.
In this particular case (assuming your comments are correct) your command will only run once because isDone will already be true on subsequent executions of the command. The timer will likely also not behave as you expect if you don't reset and restart it in initialize.
__________________
"May the coms be with you"
Is this a "programming error" or a "programmer error"?
|