269 / 269/2020RobotCode

Change Index button to execute from OI Bind() WhenPressed()

Ouverte
#15 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug enhancement invalid
Langage dominant
Java
Étoiles
0
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Need to convert the index button to a toggle instead of hold.

The Index command currently runs as the default command and periodically checks if the button is being held. The recommended way is to instead call the command while the button is pressed by using Intake_buttonA.WhenPressed(new intake_command()); in OI.

You will need to program a toggle to toggle between the Boolean values for extending or retracting the solenoid. This can be done by calling two different command, creating a toggle in the command, creating a toggle method in the subsystem and calling that.

Note you can also use the WhileHeld method and have the driver just press and release the button right away. With a delay built in the command would then end when the button was released.

Also with the current setup there is no debounce delay so the nano seconds that the button is still being held would result in the solenoid oscillating back and forth.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.