Skip to content

Commit

Permalink
add javadoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
legoguy1000 committed Jan 27, 2024
1 parent d889b4f commit 1851749
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 8 additions & 0 deletions src/main/java/frc/robot/subsystems/intake/Intake.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.SubsystemBase;

/**
* Intake Subsystem
*/
public class Intake extends SubsystemBase {
private IntakeIO io;
private IntakeInputsAutoLogged intakeAutoLogged = new IntakeInputsAutoLogged();
Expand Down Expand Up @@ -32,6 +35,11 @@ public boolean getSensorStatus() {
return intakeAutoLogged.sensorStatus;
}

/**
* Command to run the intake motor and indexer until the sensor trips
*
* @return {@link Command} to run the intake and indexer motors
*/
public Command runIntakeMotor() {
return Commands.startEnd(() -> {
setIntakeMotor(0.5);
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/frc/robot/subsystems/intake/IntakeIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@

import org.littletonrobotics.junction.AutoLog;

/**
* Intake IO Interface
*/
public interface IntakeIO {

/**
* Intake Inputs to Log
*/
@AutoLog
public static class IntakeInputs {
public double intakePercent;
Expand Down
10 changes: 7 additions & 3 deletions src/main/java/frc/robot/subsystems/intake/IntakeIOFalcon.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import com.ctre.phoenix6.hardware.TalonFX;
import frc.robot.Constants;

/**
* Intake IO Layer with real motors and sensors
*/
public class IntakeIOFalcon implements IntakeIO {

private final TalonFX intakeMotor = new TalonFX(Constants.Intake.INTAKE_MOTOR_ID, "canivore");
Expand All @@ -12,9 +15,10 @@ public class IntakeIOFalcon implements IntakeIO {
private final DutyCycleOut intakeDutyCycleOut = new DutyCycleOut(0);
private final DutyCycleOut indexerDutyCycleOut = new DutyCycleOut(0);

public IntakeIOFalcon() {

}
/**
* Intake IO Layer with real motors and sensors
*/
public IntakeIOFalcon() {}

@Override
public void updateInputs(IntakeInputs inputs) {
Expand Down

0 comments on commit 1851749

Please sign in to comment.