Team2168 / 2014_Main_Robot

Code for the 2014 FRC season.
Other
2 stars 1 forks source link

Modify automatic reload method call when entering Teleop #78

Closed jcorcoran closed 10 years ago

jcorcoran commented 10 years ago

At the Groton district we added a call to automatically reload the winch when entering teleop. This was done because it's possible for the auto mode to end WHILE the winch is retracting. This causes the reload command to be canceled. Leaving the winch partially lowered.

This is fine on the field, but dangerous in the pits. If the robot is enabled in teleop mode with the catapult up, it will automatically be pulled down - potentially hitting someone.

To prevent human injury, prevent auto-reload of catapult to only occur if we have entered teleop after having gone through auto mode. Still not 100% safe, but should be a lot safer than how things are currently operating.

NotInControl commented 10 years ago

one of the things we can try is using a new method i recently discovered. I have helped other teams use it on chiefdelphi but we never have.

It is the isFMSAttached() method apart of the driverstation. This method returns true if FMS is attached, and flase otherwise.

This method allows you to do things, only when you are on the field, and otherwise, in the pits, the method would retuen false, and have that functionality disabled. It makes testing really hard because you can not really verify the code works without using FMSlite, or an actual field, but I would be comfortable with seeing if this worked using the isFMSAttached() method so that it only retracted automatically if we were on the field. The above implementation still has flaws where an unexpected retract could occur - I believe using the isFMS method will prevent that. I'm more concerned with the Team's safety then the auto retract working.