Skip to content

Commit 661b7f1

Browse files
committed
added cameraserver and dislodge wrist pos
1 parent 24b811a commit 661b7f1

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/main/java/frc/robot/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public static final class WristConstants{
389389
public static enum WristAngleRad {
390390
FREEHANG(Units.degreesToRadians(90)),
391391
FUNNEL_ANGLE(Units.degreesToRadians(80)),
392-
DISLODGE_ANGLE(Units.degreesToRadians(215)),
392+
DISLODGE_ANGLE(Units.degreesToRadians(245)),
393393
L1(Units.degreesToRadians(252)), // Needs to be changed
394394
L2L3(Units.degreesToRadians(252)),
395395
L4(Units.degreesToRadians(210));

src/main/java/frc/robot/Robot.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
package frc.robot;
1515

16+
import edu.wpi.first.cameraserver.CameraServer;
1617
import edu.wpi.first.networktables.NetworkTableInstance;
1718
import edu.wpi.first.util.datalog.StringLogEntry;
1819
import edu.wpi.first.wpilibj.DataLogManager;
@@ -91,6 +92,9 @@ public Robot() {
9192
// Start AdvantageKit logger
9293
Logger.start();
9394

95+
// Start cameraserver for USB camera
96+
CameraServer.startAutomaticCapture();
97+
9498
// Instantiate our RobotContainer. This will perform all our button bindings,
9599
// and put our autonomous chooser on the dashboard.
96100
robotContainer = new RobotContainer();

src/main/java/frc/robot/RobotContainer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ private void competitionButtonBindings(){
156156
Trigger leftBumper = operatorController.leftBumper();
157157
leftBumper.whileTrue(new ManipulatorIntakeCoralCommand(manipulator)); // the lower one apparently doesn't do it
158158

159+
Trigger yButton = operatorController.y();
160+
yButton.onTrue(new WristGoToPositionCommand(wrist, WristAngleRad.DISLODGE_ANGLE)); //dislodge algae position
161+
yButton.onFalse(new WristGoToPositionCommand(wrist, WristAngleRad.L1));
162+
159163
Trigger leftTrigger = operatorController.leftTrigger();
160164
leftTrigger.onTrue(robotGoToHeightCommandCreator(ElevatorHeight.DISLODGE_HIGH));
161165

0 commit comments

Comments
 (0)