Skip to content

Commit

Permalink
merged main in, tried to do shufflebaord thing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan-Bauroth committed Apr 5, 2024
1 parent 63c4079 commit 610041b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/main/java/frc/robot/subsystems/drive/Drive.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import edu.wpi.first.units.Measure;
import edu.wpi.first.units.Velocity;
import edu.wpi.first.units.Voltage;
import edu.wpi.first.util.sendable.Sendable;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.DriverStation.Alliance;
import edu.wpi.first.wpilibj.Timer;
Expand Down Expand Up @@ -78,12 +79,23 @@ public class Drive extends SubsystemBase {

private boolean overrideDriveAutoAim = false;

private boolean manualOverideDriveAutoAim = false;

public boolean isOverrideDriveAutoAim() {
return overrideDriveAutoAim;
return overrideDriveAutoAim || manualOverideDriveAutoAim;
}

public void setOverrideDriveAutoAim(boolean overrideDriveAutoAim) {
this.overrideDriveAutoAim = overrideDriveAutoAim;
this.overrideDriveAutoAim = overrideDriveAutoAim || manualOverideDriveAutoAim;
}

public boolean isManualOverideDriveAutoAim() {
return manualOverideDriveAutoAim;
}

public Sendable setManualOverideDriveAutoAim(boolean manualOverideDriveAutoAim) {
this.manualOverideDriveAutoAim = manualOverideDriveAutoAim;
return null;
}

private SwerveDriveKinematics kinematics = new SwerveDriveKinematics(getModuleTranslations());
Expand Down
1 change: 1 addition & 0 deletions src/main/java/frc/robot/util/Dashboard.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public Dashboard(
builder.addDoubleProperty("Back Right Angle", () -> drive.shuffleboardMethod()[3].getAngle().getRadians(), null);
builder.addDoubleProperty("Robot Angle", () -> drive.getRotation().getRadians(), null);
});
SmartDashboard.putData("Override Auto Aim", drive.setManualOverideDriveAutoAim(!(drive.isManualOverideDriveAutoAim())));
// main.add("Hood Angle Manager", hood.hoodPositionRad)
// .withWidget(BuiltInWidgets.kEncoder);
}
Expand Down

0 comments on commit 610041b

Please sign in to comment.