Conversation
| INTAKE(12.0, 6.0), | ||
| OUTTAKE(-12.0, -12.0), | ||
| AMP(4.0, 4.0), | ||
| STOP(0.0, 0.0); |
There was a problem hiding this comment.
Add custom set point with logged tunable number (E.g. CUSTOM(new LoggedTunableNumber("Intake/Motor1", 0.0), new LoggedTunableNumber("Intake/Motor2", 0.0);)
| motorConfig.Voltage.PeakForwardVoltage = 12.0; | ||
| motorConfig.Voltage.PeakReverseVoltage = -12.0; | ||
| motorConfig.MotorOutput.NeutralMode = NeutralModeValue.Coast; | ||
|
|
There was a problem hiding this comment.
Configuration values need to be moved to the subsystem's constants file
| @@ -0,0 +1,20 @@ | |||
| package frc.robot.subsystems.intake; | |||
|
|
|||
There was a problem hiding this comment.
Cleanup all constants (set them to 0 or default values)
There was a problem hiding this comment.
Indexer/Intake uses IDs 56-59
| intakeSim.update(Constants.kLoopPeriod); | ||
|
|
||
| inputs.isIntakeConnected = true; | ||
| inputs.intakeMPS = (intakeSim.getAngularVelocityRadPerSec() / kIntakeGearing) * kWheelCircumference; |
There was a problem hiding this comment.
Should we not be calling the simulation's angular velocity in rotations and not radians and then divide by the gear ratio?
There was a problem hiding this comment.
Aren't the radians 2*pi for the full circumference? To get the true MPS you'd need (AngleRad / gearing) * (WheelCirc / 2*PI) ?
|
|
||
| // Define subsystems | ||
| // ex: private final LEDSubsystem LEDs; | ||
| // private final IndexerIntake robotIntake; |
There was a problem hiding this comment.
Go ahead and uncomment the newly added lines. The goal with the templates is that the functionality just slots in on merge.
|
|
||
| private void configureButtonBindings() { | ||
|
|
||
| // driverController.a() |
There was a problem hiding this comment.
Let's have examples for intake and outake, and put them on the same control bindings that will likely be used in competition.
| intakeSim.update(Constants.kLoopPeriod); | ||
|
|
||
| inputs.isIntakeConnected = true; | ||
| inputs.intakeMPS = (intakeSim.getAngularVelocityRadPerSec() / kIntakeGearing) * kWheelCircumference; |
There was a problem hiding this comment.
Aren't the radians 2*pi for the full circumference? To get the true MPS you'd need (AngleRad / gearing) * (WheelCirc / 2*PI) ?
| // Checks for spike in amperage, and if greater than the value | ||
| // Then the intake motor probbaly has the note | ||
| // Note currently used in code, but left for implementation | ||
| motorCurrentDetectedNote = ampFilter.calculate(inputs.intakeStatorCurrentAmps[0]) > 35; |
There was a problem hiding this comment.
This needs to be in constants, and called out in comments as a tunable number.
|
|
||
| Logger.recordOutput("IndexerIntake/StoppedByIR", false); | ||
| if(goal != null) { | ||
| if(goal == IndexerIntakeVoltageGoal.INTAKE && inputs.intakeHasNote) { |
There was a problem hiding this comment.
Let's replace "Note" with "GamePiece"
| @@ -0,0 +1,20 @@ | |||
| package frc.robot.subsystems.intake; | |||
|
|
|||
There was a problem hiding this comment.
Indexer/Intake uses IDs 56-59
NOTE Code does not work in its current state, am currently in process of refactoring
TODO Review configurations and confirm sensor actually works well
Use proper constants and add comments
Adding implementation since we are using a neo 550 for testing
NOTE This implementation is only for testing and should be rewritten if it is to be used on compbot
No description provided.