-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internals (again) #25
Conversation
@@ -103,15 +99,14 @@ public InternalSubsystem(TurretSubsystem turretSubsystem) { | |||
|
|||
// if we are in auton we start with 1 ball | |||
if (DriverStation.isAutonomous()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is called in the subsystem constructor (and the constructor invoked during robot initialization) I don't think this will work to set ballCount
to 1 when autonomous initializes. We might need to put it in Robot.autonomousInit()
and pass InternalSubsystem
from RobotContainer
to Robot
via a getter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can test out both ways. Can you test in shop to see if the ball count prints as 1 when we start autonomously?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea involving Robot.autonomousInit()
would set ballCount
to 1 every time autonomous begins which is something to watch for in testing if we're running autonomous repeatedly.
@@ -143,14 +138,12 @@ public void periodic() { | |||
motorBottom.set(0); | |||
|
|||
prevEntranceDetected = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the explicit set of prevEntranceDetected
to false accomplish anything different when it's set to entranceDetected
on line 110? I feel like this set would just be immediately overridden the next periodic loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it allows us to detect if a new ball enters or is entering internals, though it probably is already false from the ball moving. We can delete it, especially if it might be true (and another ball has entered).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autonomous init works, we can implement rejecting balls from intake when we're over 2 balls through intake after we get shooter working.
Exit will not exist on robot 2 and is not being used on robot 1.
46de88d
to
53216dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested and approved
Reopening this PR to address some final concerns with internals (and stress testing to see if the code can be broken) before marking it as fully finished.
Initial commit addresses #20 (comment).