Change Index button to execute from OI Bind() WhenPressed()
- Ngôn ngữ chính
- Java
- Star
- 0
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Look for the OI (Operator Interface) class where button bindings are set up, likely in a file like OI.java or RobotContainer.java. Find the Index command and its current binding. The task is to change from a default command with periodic checks to using WhenPressed() or WhileHeld() to trigger a toggle command that controls a solenoid in the intake subsystem. Check the intake subsystem for solenoid control methods. 'Done' means the button press toggles the solenoid state without oscillation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- backend, cli
- Loại issue
- Tái cấu trúc
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100