|
Re: Help Programming Autonomous
I hope you read this before competition, but it's also good to have initialization code that simply turns everything off when you start each state (teleop, auto and disabled). In each of our subsystems we have an init() method that simply turns off the motors associated with the subsystems and is called in each of the main init methods (teleopInit, autonomousInit and disabledInit). That could explain why your motors are starting up right away, they could be reading leftovers from the last time you were in teleop. But on second thought, this is unlikely after a power cycle, so I'm not sure. Regardless it's a good practice.
|