Quote:
Originally Posted by Adam Shapiro
Correct me if I'm wrong but I thought the user micro is passed idle values from the master when disabled or in autonomous?
|
You're half right.
When the robot is disabled, all joystick and switch input is passed along normally. It's only the outputs that are suppressed. You can see this behavior using a Dashboard program.
In autonomous mode, the inputs are indeed forced to neutral (all joysticks at 127, all switches off). But if your program doesn't do
anything in autonomous, that can be a problem. Not doing anything means not shutting off things that were trying to move just before autonomous was selected. That's what Eric and Tom are trying to warn about.
If you want to remove all autonomous actions, make sure to leave in the part at the beginning that sets all the pwm outputs to 127. Otherwise, a mistrimmed joystick or flipped switch can cause things to start moving and not stop until the teleoperated code starts running.
Here's another piece of useful advice: if you have limit switches to protect mechanisms from moving too far, put the code to read the switches (and take action based on them) in the
Process_Data_From_Local_IO() function, and call that function from within the autonomous loop. The default code only calls it when in teleoperated mode.