Skip to content

Commit

Permalink
Merge branch 'preDistrictComp' of https://github.com/DevilBotz2876/Cr…
Browse files Browse the repository at this point in the history
…escendo2024 into preDistrictComp_driveToAmp
  • Loading branch information
BrownGenius committed Apr 2, 2024
2 parents 7cab942 + e98fcba commit ae56cd5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/config/RobotConfigInferno.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ public RobotConfigInferno() {
"shooter",
"1188",
new Transform3d(
new Translation3d(-Units.inchesToMeters(10.5), 0, Units.inchesToMeters(13)),
new Rotation3d(0, Units.degreesToRadians(-28), Units.degreesToRadians(180)))));
new Translation3d(-Units.inchesToMeters(9.5), 0, Units.inchesToMeters(14)),
new Rotation3d(0, Units.degreesToRadians(-32), Units.degreesToRadians(180)))));

cameras.add(
new VisionCamera(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class IntakeIOSparkMax implements IntakeIO {
// Gets the NEO encoder
private final RelativeEncoder encoder;
DigitalInput limitSwitchIntake = new DigitalInput(1);
DigitalInput limitSwitchIntakeSecondary = new DigitalInput(2);

public IntakeIOSparkMax(int id, boolean inverted) {
leader = new CANSparkMax(id, MotorType.kBrushless);
Expand All @@ -31,7 +32,10 @@ public IntakeIOSparkMax(int id, boolean inverted) {
@Override
public void updateInputs(IntakeIOInputs inputs) {
inputs.appliedVolts = leader.getAppliedOutput() * leader.getBusVoltage();
inputs.limitSwitchIntake = !limitSwitchIntake.get();
inputs.limitSwitchIntake =
!limitSwitchIntake.get()
|| !limitSwitchIntakeSecondary
.get(); // Assume note in intake if either sensor is triggered
inputs.current = leader.getOutputCurrent();
inputs.velocityRadPerSec =
Units.rotationsPerMinuteToRadiansPerSecond(encoder.getVelocity() / GEAR_RATIO);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/util/DevilBotState.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public enum SpeakerShootingMode {
SPEAKER_VISION_BASED,
}

private static SpeakerShootingMode shootingMode = SpeakerShootingMode.SPEAKER_FROM_SUBWOOFER;
private static SpeakerShootingMode shootingMode = SpeakerShootingMode.SPEAKER_VISION_BASED;

public static void setShootingMode(SpeakerShootingMode position) {
DevilBotState.shootingMode = position;
Expand Down

0 comments on commit ae56cd5

Please sign in to comment.