|
Re: DefaultCommand won't restart?
Sorry for not posting the solution I found!
Long story short, I needed to call SetExpiration(double X.Y) and SetSafetyEnabled(false) for the RobotDrive object.
The example I was trying to play with/test was basic ArcadeDrive, and a command that would drive the motors forward for 5 seconds. SetSafetyEnabled(true) with no SetExpiration(double X.Y) was called for the RobotDrive object initialization for the subsystem. The command would set the RobotDrive object (which I'll just call *drive) to drive->Drive(0.7) and SetTimeout(5) in the Initialize method of the command. Then, IsFinished would return IsTimedOut().
At runtime, whenever the button that spawned this command was called, the diagnostics tab would spit out errors about motors exceeding a timeout at line 117 of MotorSafetyHelper.cpp. And so on.
Essentially, this was a problem I could have solved by looking at the Simple Robot Template, a beginner's mistake.
__________________
sudo chmod u+x helloworld.sh
gotta start somewhere.
|