Edit: DriverStation has a function called InDisabled(boolean)
Try calling that with true; it might work.
---
You can override isDisabled() in your robot class like this:
Code:
public boolean isDisabled() {
return super.isDisabled() || myDisableFlag;
}
This should work whether you extend RobotBase or IterativeRobot
Two things:
- The Driver Station won't recognize that you are disabled when you set the flag
- You'll need to make sure to clear the flag yourself when you want to enable again