Open mikedennis2 opened 3 years ago
There are many ways this could be implemented. Here is an idea I had:
Add three new public member variables for the three new sensors.
ballIndexSensor1
, ballIndexSensor2
, ballIndexSensor3
, and ballIndexSensor4
.Add three new public member booleans to keep track of whether or not a ball is detected at a sensor.
ballNotDetectedSensor1
, ballNotDetectedSensor2
, ballNotDetectedSensor3
, and ballNotDetectedSensor4
.Add calls to retrieve the reading from the new sensors in the periodic method.
.get()
method for the DIO sensors.Add a member variable to keep track of the next ball position.
Add a method to get the next ball position.
Move the upper conveyor (Vertical one) to the ConveyorSubsystem class from the ShooterSubsystem.
Update the method to move the lower conveyor.
Add a method to move the upper conveyor.
Add a method to increment the next ball position.
Add a method to reset the next ball position variable after the balls have been shot. (This is not in commit e294259)
The current intake command is done in SequentialIntakeBall.java
. This runs a few commands in sequence. We need to modify this to apply the new scheme as described in the attached document.
Sequence of Operations for Collecting and Shooting Power Cells.docx
Let's change InitCommandUntilBallFound
to be call RunIntakeUntilBallFound
.
Modify the IntakeBall
command to take into account a desired next ball position.
ConveyorSubsytem
.ConveyorSubystem
.This should be enough to get started...
Commit e294259 provides some skeleton and comments on the next steps.
New system will contain three more sensors in the conveyor system (one in place already).