diff --git a/src/main/java/org/sciborgs1155/robot/Ports.java b/src/main/java/org/sciborgs1155/robot/Ports.java index 55c0ce2e..0cf90fe7 100644 --- a/src/main/java/org/sciborgs1155/robot/Ports.java +++ b/src/main/java/org/sciborgs1155/robot/Ports.java @@ -15,7 +15,7 @@ public static final class Pivot { public static final int SPARK_LEFT_TOP = 7; public static final int SPARK_RIGHT_TOP = 39; public static final int SPARK_LEFT_BOTTOM = 51; - public static final int SPARK_RIGHT_BOTTOM = 55; + public static final int SPARK_RIGHT_BOTTOM = 35; } public static final class Feeder { @@ -41,6 +41,6 @@ public static final class Intake { } public static final class Led { - public static final int LED_PORT = 2; // led port + public static final int LED_PORT = 1; // led port } } diff --git a/src/main/java/org/sciborgs1155/robot/Robot.java b/src/main/java/org/sciborgs1155/robot/Robot.java index 9d989749..0c796e3e 100644 --- a/src/main/java/org/sciborgs1155/robot/Robot.java +++ b/src/main/java/org/sciborgs1155/robot/Robot.java @@ -84,6 +84,7 @@ public class Robot extends CommandRobot implements Logged { default -> Pivot.none(); }; + private final PowerDistribution pdh = new PowerDistribution(); private final LedStrip led = new LedStrip(); private final Vision vision = Vision.create(); @@ -118,7 +119,7 @@ private void configureGameBehavior() { SmartDashboard.putData(CommandScheduler.getInstance()); // Log PDH - SmartDashboard.putData("PDH", new PowerDistribution()); + SmartDashboard.putData("PDH", pdh); // addPeriodic(() -> log("current", FakePDH.update()), PERIOD.in(Seconds)); // Configure pose estimation updates every tick @@ -137,6 +138,8 @@ private void configureGameBehavior() { if (isReal()) { URCL.start(); + pdh.clearStickyFaults(); + pdh.setSwitchableChannel(true); } else { DriverStation.silenceJoystickConnectionWarning(true); addPeriodic(() -> vision.simulationPeriodic(drive.pose()), PERIOD.in(Seconds)); @@ -232,6 +235,12 @@ private void configureBindings() { .whileTrue( shooting.shootWithPivot(PivotConstants.FEED_ANGLE, ShooterConstants.DEFAULT_VELOCITY)); + // shoot 45 deg FAST (far as possible) + // operator + // .povLeft() + // .whileTrue( + // shooting.shootWithPivot(Radians.of(0.619), ShooterConstants.MAX_VELOCITY)); + // operator climb (b) operator .b()