You do have to put the robot into Autonomous mode before it'll take effect.
Normally, we use a
special switch constructed for the purpose. (You can ignore switch 3 on that schematic. It's for earlier versions of the IFI control system.)
The disable button is handy to have in any case for emergency stops.
You can also setup an auto routine to run while you push a joystick button.
If you only want to run autonomous and don't care about Teleop, there is a way to set the team number most-significant-bit so the robot runs Auto mode all the time.
P.S.
Since you're using PWM 1 and 2 only, the auto code needs to be adjusted to reflect this, rather than pwm01/pwm02 and pwm03/pwm04
E.g.,
pwm01 = 200;
pwm02 = 54;