Skip to content

Commit ce72e90

Browse files
committed
aimbot changes
1 parent fcf8829 commit ce72e90

8 files changed

Lines changed: 24 additions & 22 deletions

File tree

src/main/deploy/pathplanner/paths/New New New New New Path.path

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"waypoints": [
44
{
55
"anchor": {
6-
"x": 1.8292964403332503,
7-
"y": 8.092188053135022
6+
"x": 2.6841875081753006,
7+
"y": 6.113056676897948
88
},
99
"prevControl": null,
1010
"nextControl": {
11-
"x": 1.8477029345453428,
12-
"y": 8.11979779445316
11+
"x": 2.7025940023873933,
12+
"y": 6.140666418216085
1313
},
1414
"isLocked": false,
1515
"linkedName": null

src/main/java/frc/robot/BuildConstants.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ public final class BuildConstants {
55
public static final String MAVEN_GROUP = "";
66
public static final String MAVEN_NAME = "2024RobotCode";
77
public static final String VERSION = "unspecified";
8-
public static final int GIT_REVISION = 345;
9-
public static final String GIT_SHA = "5729f7bc2bcc792a299c988a8de8ef3a0eb64cef";
10-
public static final String GIT_DATE = "2024-08-18 08:32:29 EDT";
8+
public static final int GIT_REVISION = 346;
9+
public static final String GIT_SHA = "fcf8829b06301b17107b8cc0514afcee04946385";
10+
public static final String GIT_DATE = "2024-08-18 11:34:34 EDT";
1111
public static final String GIT_BRANCH = "marc";
12-
public static final String BUILD_DATE = "2024-08-18 10:47:32 EDT";
13-
public static final long BUILD_UNIX_TIME = 1723992452685L;
12+
public static final String BUILD_DATE = "2024-08-18 15:14:30 EDT";
13+
public static final long BUILD_UNIX_TIME = 1724008470026L;
1414
public static final int DIRTY = 1;
1515

1616
private BuildConstants() {}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ private void testControls() {
589589
// driveController.a().whileTrue(new TurnToSource(drive, driveController));
590590

591591
// driveController.a().whileTrue(new DriveToChain(drive));
592-
driveController.a().onTrue(new InstantCommand(() -> shooter.setFlywheelRPMs(5000, 5000)));
592+
driveController.a().onTrue(new InstantCommand(() -> shooter.setFlywheelRPMs(5700, 5300)));
593593
driveController.a().onFalse(new InstantCommand(() -> shooter.stopFlywheels()));
594594

595595
driveController.x().onTrue(new SetPivotTarget(90, pivot));

src/main/java/frc/robot/commands/AimbotStatic.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void angleShooter() {
109109
if (DriverStation.getAlliance().isPresent()) this.alliance = DriverStation.getAlliance().get();
110110
// Logger.recordOutput("distance to speak", Units.metersToFeet(distanceToSpeakerMeter));
111111
distanceToSpeakerMeter = calculateDistanceToSpeaker();
112-
if (Units.metersToFeet(distanceToSpeakerMeter) > 12) {
112+
if (Units.metersToFeet(distanceToSpeakerMeter) > 13) {
113113
// double shootingSpeed =
114114
// MathUtil.clamp(
115115
// calculateShooterSpeed(Units.metersToFeet(distanceToSpeakerMeter)), 3250, 5400);
@@ -133,7 +133,7 @@ else if (drive.getPose().getY() > 6.5)
133133
// center
134134
else shooter.setFlywheelRPMs(shootingSpeed, shootingSpeed);
135135
}
136-
} else shooter.setFlywheelRPMs(5200, 5000);
136+
} else shooter.setFlywheelRPMs(5700, 5400);
137137
pivot.setPivotGoal(calculatePivotAngleDeg(distanceToSpeakerMeter));
138138
}
139139

@@ -158,7 +158,7 @@ private double calculatePivotAngleDeg(double distanceToSpeakerMeter) {
158158
return 34;
159159
}
160160
Logger.recordOutput("pivot target auto", pivotSetpointDeg);
161-
return pivotSetpointDeg + 2.26;
161+
return pivotSetpointDeg + 2.9;
162162
}
163163

164164
private double calculateDistanceToSpeaker() {

src/main/java/frc/robot/commands/AimbotTele.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public void angleShooter() {
115115
double shootingSpeed = calculateShooterSpeed(Units.metersToFeet(distanceToSpeakerMeter));
116116

117117
shooter.setFlywheelRPMs(shootingSpeed, shootingSpeed + 100);
118-
} else shooter.setFlywheelRPMs(5400 - 200, 5400 - 400);
118+
} else shooter.setFlywheelRPMs(5700, 5400);
119119
pivot.setPivotGoal(calculatePivotAngleDeg(distanceToSpeakerMeter));
120120
}
121121

src/main/java/frc/robot/commands/TurnToAmpCorner.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public TurnToAmpCorner(
7171
@Override
7272
public void initialize() {
7373
pivot.setPivotGoal(45);
74-
shooter.setFlywheelRPMs(5000, 4400);
74+
shooter.setFlywheelRPMs(4800, 4200);
7575
}
7676

7777
// Called every time the scheduler runs while the command is scheduled.
@@ -85,17 +85,17 @@ public void execute() {
8585
"trans2",
8686
new Translation2d(
8787
FieldConstants.fieldLength - drive.getPose().getX(),
88-
FieldConstants.fieldWidth - drive.getPose().getY()));
88+
(FieldConstants.fieldWidth - 2.5) - drive.getPose().getY()));
8989
targetAngle =
9090
new Rotation2d(
9191
FieldConstants.fieldLength - drive.getPose().getX(),
92-
FieldConstants.fieldWidth - drive.getPose().getY())
92+
(FieldConstants.fieldWidth - 2.5) - drive.getPose().getY())
9393
.getDegrees()
9494
+ 180;
9595
pid.setSetpoint(
9696
new Rotation2d(
9797
FieldConstants.fieldLength - drive.getPose().getX(),
98-
FieldConstants.fieldWidth - drive.getPose().getY())
98+
(FieldConstants.fieldWidth - 2.5) - drive.getPose().getY())
9999
.getDegrees()
100100
+ 180);
101101
// pid.setSetpoint(
@@ -106,14 +106,15 @@ public void execute() {
106106
// + 180);
107107
} else {
108108
// Logger.recordOutput("trans2", new Translation2d(0, FieldConstants.fieldWidth));
109-
targetAngle = new Translation2d(0, FieldConstants.fieldWidth).getAngle().getDegrees();
109+
targetAngle = new Translation2d(0, (FieldConstants.fieldWidth - 2.5)).getAngle().getDegrees();
110110
// new Rotation2d(0, FieldConstants.fieldWidth).getDegrees() + 180;
111111
// pid.setSetpoint(
112112
// new Rotation2d(0, FieldConstants.fieldWidth).getDegrees()
113113
// + 180);
114114
pid.setSetpoint(
115115
new Rotation2d(
116-
-drive.getPose().getX(), FieldConstants.fieldWidth - drive.getPose().getY())
116+
-drive.getPose().getX(),
117+
(FieldConstants.fieldWidth - 2.5) - drive.getPose().getY())
117118
.getDegrees()
118119
+ 180);
119120
// pid.setSetpoint(

src/main/java/frc/robot/subsystems/Shooter/Shooter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public NoteState seesNote() {
196196
lastNoteState = NoteState.SENSOR;
197197
return NoteState.SENSOR;
198198

199-
} else if (feedInputs.currentAmps > 14.5) {
199+
} else if (feedInputs.currentAmps > 13) {
200200
// } else if (feedInputs.currentAmps > 10000) {
201201
Logger.recordOutput("see note val", "current");
202202
lastNoteState = NoteState.CURRENT;

src/main/java/frc/robot/subsystems/drive/Drive.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ public void visionLogic() {
379379
xMeterStds = 0.7;
380380
yMeterStds = 0.7;
381381
headingDegStds = 8;
382-
} else if (limelightMeasurement.tagCount == 1 && poseDifference < 0.5) { // && poseDifference < 0.5
382+
} else if (limelightMeasurement.tagCount == 1
383+
&& poseDifference < 0.5) { // && poseDifference < 0.5
383384
xMeterStds = 5;
384385
yMeterStds = 5;
385386
headingDegStds = 30;

0 commit comments

Comments
 (0)