-
Notifications
You must be signed in to change notification settings - Fork 7
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
new intake special movements #51
Conversation
subsystems/intakesubsystem.py
Outdated
@@ -161,7 +157,7 @@ def periodic(self) -> None: | |||
* constants.kPivotGearRatio, | |||
) | |||
self.intakeMotor.set( | |||
NEOBrushless.ControlMode.Velocity, constants.kIntakeSpeed * -1 | |||
NEOBrushless.ControlMode.Velocity, constants.kIntakePercentageVoltage * -1 |
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 should have a different ejecting voltage than intaking
subsystems/intakesubsystem.py
Outdated
self.intakeMotor.set(NEOBrushless.ControlMode.Position, self.heldPosition) | ||
|
||
if self.putInPlace: | ||
self.intakeMotor.set(NEOBrushless.ControlMode.Position, self.heldPosition) |
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.
shouldn't this hold position logic exist in other held areas?
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.
Yeah, this is far from done but wanted to see if this seems about right for the general idea
8101527
to
2ed9c4d
Compare
subsystems/intakesubsystem.py
Outdated
self.intakeMotor.set( | ||
NEOBrushless.ControlMode.Position, self.heldPosition | ||
NEOBrushless.ControlMode.Percent, constants.kIntakePercentageVoltage |
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.
should probably be slower here for fine control, like 1/2 speed
constants.py
Outdated
50 | ||
) # Safe place roughly vertical before going to amp or trap | ||
kAmpScoringPositionAngle = Rotation2d.fromDegrees(69.939031) | ||
kStagingPositionangle = kAmpScoringPositionAngle |
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.
you set this constant to 50 degrees and then redefine it
@@ -68,6 +69,9 @@ def periodic(self) -> None: | |||
frontLimitState = self.intakeMotor.getLimitSwitch(self.frontSensor) | |||
backLimitState = self.intakeMotor.getLimitSwitch(self.backSensor) | |||
self.hasPosition = backLimitState or frontLimitState | |||
if not self.hasPosition: | |||
self.putInPlace = False | |||
|
|||
if self.state == self.IntakeState.Intaking: |
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.
there's nothing in this state that tells the intake motor to run inwards, and there should also be logic for hasposition
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.
Intake running is done by voltage control, so it's assumed we have the inversion true/false the way that it is irl, also has position does have logic (it's true when either sensor is on, the line right above)
this isn't necessarily ready to be pushed in yet, but I'd like y'all to check over it anyway