Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public class Ports {
}

public final class ShooterConstants {
// Constants for the Shooter
// Constants for the Shooter
public static final Angle ANGLE_TOLERANCE = Rotations.of(0.01);
public static final AngularVelocity ANGLE_VELOCITY_TOLERANCE = RotationsPerSecond.of(0.01);
public static final AngularVelocity CRUISE_VELOCITY = RotationsPerSecond.of(204);
Expand All @@ -112,9 +112,10 @@ public final class ShooterConstants {
public static final Angle MAX_ANGLE = Rotations.of(10.0);
public static final Angle STARTING_ANGLE = Rotations.of(0.0);
public static final Distance WHEEL_RADIUS = Meters.of(0.5);
public static final RotaryMechCharacteristics CONSTANTS = RotaryMechCharacteristics(OFFSET, WHEEL_RADIUS, MIN_ANGLE, MAX_ANGLE, STARTING_ANGLE);
public static final RotaryMechCharacteristics CONSTANTS =
RotaryMechCharacteristics(OFFSET, WHEEL_RADIUS, MIN_ANGLE, MAX_ANGLE, STARTING_ANGLE);
}

public static final int CANDLE_ID = 50;

public class IntakeConstants {
Expand All @@ -131,6 +132,7 @@ public class IntakeConstants {
public static final RotaryMechCharacteristics CONSTANTS =
new RotaryMechCharacteristics(OFFSET, WHEEL_RADIUS, MIN_ANGLE, MAX_ANGLE, STARTING_ANGLE);
}

public class ClimberConstants {
public static final Distance TOLERANCE = Inches.of(0.1);
public static final double GEARING = (5.0 / 1.0);
Expand All @@ -139,6 +141,12 @@ public class ClimberConstants {
public static final Distance STARTING_DISTANCE = Inches.of(0.0);
public static final Distance DRUM_RADIUS = Inches.of(2.0);
public static final DistanceAngleConverter CONVERTER = new DistanceAngleConverter(DRUM_RADIUS);
public static final LinearMechCharacteristics CHARACTERISTICS = new LinearMechCharacteristics(new Translation3d(0.0, 0.0, 0.0), MIN_DISTANCE, MAX_DISTANCE, STARTING_DISTANCE, CONVERTER);
public static final LinearMechCharacteristics CHARACTERISTICS =
new LinearMechCharacteristics(
new Translation3d(0.0, 0.0, 0.0),
MIN_DISTANCE,
MAX_DISTANCE,
STARTING_DISTANCE,
CONVERTER);
}
}
15 changes: 15 additions & 0 deletions src/main/java/frc/robot/subsystems/hood/hood.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package frc.robot.subsystems.hood;

import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.lib.W8.mechanisms.linear.LinearMechanism;

public class hood extends SubsystemBase {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change hood to be Capitalized.

private final LinearMechanism _io;

public hood(LinearMechanism io) {
_io = io;
}

@Override
public void periodic() {}
}
20 changes: 9 additions & 11 deletions src/main/java/frc/robot/subsystems/hopper/Hopper.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@

import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.lib.W8.mechanisms.flywheel.FlywheelMechanism;
import frc.robot.Constants;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove any changes not related to the hood


public class Hopper extends SubsystemBase {

private FlywheelMechanism _io;
private FlywheelMechanism _io;

public Hopper(FlywheelMechanism io) {
_io = io;
}
public Hopper(FlywheelMechanism io) {
_io = io;
}

public void setGoal(double position) {
Distance positionInches = Inches.of(position);
_io.runPosition(HopperConstants.CONVERTER.toAngle(positionInches), PIDSlot.SLOT_0);
}
public void setGoal(double position) {
Distance positionInches = Inches.of(position);
_io.runPosition(HopperConstants.CONVERTER.toAngle(positionInches), PIDSlot.SLOT_0);
}

@Override
public void periodic() {}

}
}