|
Re: Autonomous
Are you changing the "auton" parameter from SmartDashboard? You need to tab away from the input box after changing its value for the changes to come through. Try putting a SmartDashboard::PutNumber right after the GetNumber in Autonomous() with a different name in order to make sure that you're reading the number correctly. Also, I'd suggest not using cout since I'm not sure if you can view console output without Riolog. Try using another SmartDashboard variable for that.
On other small flaws I can see, I suggest using a while loop that runs while the robot is autonomous and enabled around drive code instead of blindly waiting. I'm not sure if just waiting would cause any issues with the code you have right now but if your method gets more complex and requires cleanup after it's complete, you're probably going to need to switch to IterativeRobot or have a while loop. And I'm also not sure why you added a SetSafetyEnabled(false).
|