Skip to content

Commit c72d689

Browse files
L1 stuff and refactor
1 parent 185e66f commit c72d689

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/main/java/frc/trigon/robot/misc/objectdetectioncamera/ObjectPoseEstimator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ public class ObjectPoseEstimator extends SubsystemBase {
2626
* @param gamePieceType the type of game piece to track
2727
* @param cameras the cameras used for detecting objects
2828
*/
29-
public ObjectPoseEstimator(double deletionThresholdSeconds, DistanceCalculationMethod distanceCalculationMethod, SimulatedGamePieceConstants.GamePieceType gamePieceType, ObjectDetectionCamera... cameras) {
29+
public ObjectPoseEstimator(double deletionThresholdSeconds, DistanceCalculationMethod distanceCalculationMethod,
30+
SimulatedGamePieceConstants.GamePieceType gamePieceType,
31+
ObjectDetectionCamera... cameras) {
3032
this.deletionThresholdSeconds = deletionThresholdSeconds;
3133
this.gamePieceType = gamePieceType;
3234
this.cameras = cameras;

src/main/java/frc/trigon/robot/subsystems/coralintake/CoralIntakeCommands.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
import edu.wpi.first.wpilibj2.command.StartEndCommand;
77
import frc.trigon.robot.RobotContainer;
88
import frc.trigon.robot.commands.commandfactories.CoralCollectionCommands;
9+
import frc.trigon.robot.commands.commandfactories.CoralPlacingCommands;
910
import frc.trigon.robot.commands.commandfactories.GeneralCommands;
11+
import frc.trigon.robot.constants.OperatorConstants;
1012
import org.trigon.commands.GearRatioCalculationCommand;
1113
import org.trigon.commands.NetworkTablesCommand;
1214

@@ -41,7 +43,7 @@ public static Command getCoralIntakeDefaultCommand() {
4143
return GeneralCommands.getContinuousConditionalCommand(
4244
getPrepareForStateCommand(CoralIntakeConstants.CoralIntakeState.COLLECT_FROM_FLOOR),
4345
getSetTargetStateCommand(CoralIntakeConstants.CoralIntakeState.REST),
44-
() -> CoralCollectionCommands.SHOULD_KEEP_INTAKE_OPEN
46+
() -> CoralCollectionCommands.SHOULD_KEEP_INTAKE_OPEN && !OperatorConstants.REEF_CHOOSER.getScoringLevel().equals(CoralPlacingCommands.ScoringLevel.L1_CORAL_INTAKE)
4547
);
4648
}
4749

0 commit comments

Comments
 (0)