Skip to content

Commit

Permalink
Checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
nowireless committed Jan 15, 2024
1 parent 833a1dc commit 000ac1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/subsystems/Drivetrain.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public Drivetrain(VisionSubsystem vision) {

Mk4ModuleConfiguration moduleConfig = Mk4ModuleConfiguration.getDefaultSteerNEO();
moduleConfig.setNominalVoltage(Constants.DriveConstants.kDriveVoltageCompensation);
moduleConfig.setDriveCurrentLimit(40);

// : Swerve setup
this.m_swerve_modules[0] =
Expand All @@ -101,7 +102,7 @@ public Drivetrain(VisionSubsystem vision) {
},
new Pose2d(),
VecBuilder.fill(0.1, 0.1, 0.1),
VecBuilder.fill(0.5, 0.5, 0.5));
VecBuilder.fill(1.5, 1.5, 1.5)); // 7028 uses 1.5

var odometryTab =
tab.getLayout("Odometry", BuiltInLayouts.kList).withSize(2, 2).withPosition(10, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/subsystems/VisionSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void periodic() {
// when to accept updates
if (true) {
SmartDashboard.putBoolean("Vision accepting updates", true);
if (inputs[i].hasTarget && inputs[i].isNew && inputs[i].maxDistance < LOWEST_DISTANCE) {
if (inputs[i].hasTarget && inputs[i].isNew && inputs[i].maxDistance < LOWEST_DISTANCE && inputs[i].maxAmbiguity < 0.4) {
if (useSingleTag) {
if (inputs[i].singleIDUsed == acceptableTagID) {
processVision(i);
Expand Down

0 comments on commit 000ac1d

Please sign in to comment.