Skip to content

Commit 8110922

Browse files
committed
Merge branch 'main' into tag-align
2 parents cf7b8e6 + 6c593e9 commit 8110922

File tree

9 files changed

+89
-95
lines changed

9 files changed

+89
-95
lines changed

src/main/java/frc/robot/commands/robotState/ScoreAlgaeCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public boolean isFinished() {
4343
} else {
4444
return robotStateSubsystem.getState() == RobotStates.BARGE_ALGAE
4545
|| robotStateSubsystem.getState() == RobotStates.PROCESSOR_ALGAE
46-
|| !robotStateSubsystem.isBargeSafe;
46+
|| !robotStateSubsystem.getIsBargeSafe();
4747
}
4848
}
4949
}

src/main/java/frc/robot/commands/robotState/ScoreReefManualCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public ScoreReefManualCommand(
2525
public void initialize() {
2626
startingRobotState = robotStateSubsystem.getState();
2727
startingElevatorFinished = elevatorSubsystem.isFinished();
28-
robotStateSubsystem.setIsAuto(false);
28+
robotStateSubsystem.setIsAutoPlacing(false);
2929
robotStateSubsystem.setGetAlgaeOnCycle(false);
3030
robotStateSubsystem.toPrepCoral();
3131
}

src/main/java/frc/robot/commands/robotState/ToggleGetAlgaeCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ public ToggleGetAlgaeCommand(RobotStateSubsystem robotStateSubsystem) {
1212

1313
@Override
1414
public void initialize() {
15-
robotStateSubsystem.ToggleGetAlgaeOnCycle();
15+
robotStateSubsystem.toggleGetAlgaeOnCycle();
1616
}
1717
}

src/main/java/frc/robot/constants/BiscuitConstants.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ public class BiscuitConstants {
2828
public static final double kTicksPerRot = 160;
2929
public static final int talonID = 25;
3030
public static final double kCloseEnough = 0.05;
31-
public static final Angle kMaxFwd = Rotations.of(51.04735 + 5);
32-
public static final Angle kMaxRev = Rotations.of(-12.3489 - 5);
3331
public static final double kSafeToStowUpper = 40;
3432
public static final double kSafeToStowLower = -5;
3533

@@ -43,8 +41,8 @@ public class BiscuitConstants {
4341
public static final Angle kL2AlgaeSetpoint = Rotations.of(24.104);
4442
public static final Angle kL3AlgaeSetpoint = Rotations.of(24.562);
4543

46-
public static final Angle kL2AlgaeRemovalSetpoint = kL2AlgaeSetpoint;
47-
public static final Angle kL3AlgaeRemovalSetpoint = kL3AlgaeSetpoint;
44+
public static final Angle kL2AlgaeRemovalSetpoint = kStowSetpoint;
45+
public static final Angle kL3AlgaeRemovalSetpoint = kStowSetpoint;
4846

4947
// Coral score
5048
public static final Angle kL1CoralSetpoint = kStowSetpoint;
@@ -66,6 +64,10 @@ public class BiscuitConstants {
6664
public static final double kJogAmountUp = 10;
6765
public static final double kJogAmountDown = -10;
6866

67+
// Soft Limits
68+
public static final Angle kMaxFwd = kMicAlgaeSetpoint.plus(Rotations.of(5));
69+
public static final Angle kMaxRev = kBargeBackwardSetpoint.minus(Rotations.of(5));
70+
6971
// Disables the TalonFXS by setting its voltage to zero.
7072
public static VoltageConfigs disableTalon() {
7173
VoltageConfigs voltage =

src/main/java/frc/robot/constants/ElevatorConstants.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ public class ElevatorConstants {
2525
public static final double kMaxRev = 2;
2626
public static final int kZeroMultiple =
2727
0; // some constant to multiply, add by to turn the analog input into a position
28-
public static final double kZeroSpeed = -.05;
28+
public static final double kZeroSpeed = -0.05;
2929
public static final double kZeroVolts = -0.5;
3030
public static final int kZeroCounter = 2;
31-
public static final double kZeroedThreshhold = .025;
31+
public static final double kZeroedThreshhold = 0.025;
3232

33-
public static final int heightAnalogID = 0;
3433
public static final int kFxIDMain = 20;
3534
public static final int kFxIDFollow = 21;
3635

@@ -74,7 +73,6 @@ public static TalonFXConfiguration getBothFXConfig() {
7473
CurrentLimitsConfigs current =
7574
new CurrentLimitsConfigs()
7675
.withStatorCurrentLimitEnable(false)
77-
// .withStatorCurrentLimit(20)
7876
.withSupplyCurrentLimitEnable(true)
7977
.withSupplyCurrentLimit(40)
8078
.withSupplyCurrentLowerLimit(10)
@@ -129,7 +127,7 @@ public static TalonFXConfiguration getBothFXConfig() {
129127

130128
public static CurrentLimitsConfigs getZeroingCurrentLimitsConfigs() {
131129
CurrentLimitsConfigs current =
132-
new CurrentLimitsConfigs() // TODO actually have correct limits for zeroing
130+
new CurrentLimitsConfigs()
133131
.withStatorCurrentLimitEnable(false)
134132
.withStatorCurrentLimit(20)
135133
.withSupplyCurrentLimit(10)

src/main/java/frc/robot/subsystems/elevator/ElevatorIOFX.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import com.ctre.phoenix6.hardware.TalonFX;
1313
import edu.wpi.first.units.measure.Angle;
1414
import edu.wpi.first.units.measure.AngularVelocity;
15-
import edu.wpi.first.wpilibj.AnalogInput;
1615
import frc.robot.constants.ElevatorConstants;
1716
import org.slf4j.Logger;
1817
import org.slf4j.LoggerFactory;
@@ -30,7 +29,6 @@ public class ElevatorIOFX implements ElevatorIO {
3029
TalonFXConfigurator configuratorBack;
3130
StatusSignal<Angle> currPosition;
3231
StatusSignal<AngularVelocity> currVelocity;
33-
public AnalogInput heightAnalogInput = new AnalogInput(ElevatorConstants.heightAnalogID);
3432
private MotionMagicVoltage positionRequestMain =
3533
new MotionMagicVoltage(0).withEnableFOC(false).withSlot(0);
3634
private Follower positionRequestFollow = new Follower(ElevatorConstants.kFxIDMain, false);

src/main/java/frc/robot/subsystems/funnel/FunnelSubsystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void stopMotor() {
9090
setPercent(0.0);
9191
}
9292

93-
public void ClearCoral() {
93+
public void clearCoral() {
9494
curState = FunnelState.HasNotSeenCoral;
9595
}
9696
}

src/main/java/frc/robot/subsystems/pathHandler/PathHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public void setStartNode(Character startNode) {
9090
public void startPathHandler() {
9191
nodeNames.add(0, startNode);
9292
isHandling = true;
93+
robotStateSubsystem.setIsAutoPlacing(false);
9394
curState = PathStates.DRIVE_FETCH;
9495
}
9596

@@ -189,6 +190,7 @@ public void killPathHandler() {
189190
isHandling = false;
190191
curState = PathStates.DONE;
191192
runningPath = false;
193+
robotStateSubsystem.setIsAutoPlacing(true);
192194
timer.stop();
193195
timer.reset();
194196
}

0 commit comments

Comments
 (0)