Skip to content

Commit

Permalink
Merge pull request #135 from 2491-NoMythic/event_state_better_auto
Browse files Browse the repository at this point in the history
Event state better auto
  • Loading branch information
KnightPiscesAugie authored May 8, 2024
2 parents b4b4d98 + 1e9290d commit 1285e3f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"x": 0.6842044526319189,
"y": 6.690138362483131
},
"rotation": -117.0
"rotation": -120.0
},
"command": {
"type": "sequential",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"x": 0.7523718013035084,
"y": 4.450354048988052
},
"rotation": 117.3
"rotation": 120.0
},
"command": {
"type": "sequential",
Expand Down
16 changes: 8 additions & 8 deletions src/main/deploy/pathplanner/paths/Blue2AutoPickup.path
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"waypoints": [
{
"anchor": {
"x": 5.475395244977917,
"y": 6.310348848455705
"x": 5.640944520323205,
"y": 6.602494628476801
},
"prevControl": null,
"nextControl": {
"x": 5.603853803121001,
"y": 6.273836408727811
"x": 5.769403078466289,
"y": 6.565982188748907
},
"isLocked": false,
"linkedName": null
Expand All @@ -20,12 +20,12 @@
"y": 6.281134270453595
},
"prevControl": {
"x": 5.942217077535311,
"y": 6.352516764936465
"x": 6.010995841683261,
"y": 6.495374509135732
},
"nextControl": {
"x": 6.507643667719127,
"y": 6.193490536447265
"x": 6.4076064401853925,
"y": 6.03614118455432
},
"isLocked": false,
"linkedName": null
Expand Down
12 changes: 6 additions & 6 deletions src/main/deploy/pathplanner/paths/BlueAmpShoot1.path
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
},
"prevControl": null,
"nextControl": {
"x": 4.326288510228267,
"y": 7.751601363226451
"x": 4.219168390887197,
"y": 7.936627023906479
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 4.725554409590433,
"y": 6.436945353131514
"x": 4.764507180259913,
"y": 6.621971013811542
},
"prevControl": {
"x": 4.71302813700922,
"y": 6.874943512199754
"x": 4.598957904914624,
"y": 7.128357032514777
},
"nextControl": null,
"isLocked": false,
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,12 @@ private void lightsInst() {
private void configureBindings() {
new Trigger(AmpAngleSup).onTrue(new InstantCommand(driveTrain::pointWheelsInward, driveTrain));
SmartDashboard.putData("drivetrain", driveTrain);
Command setGyroTo180 = new InstantCommand(()->driveTrain.zeroGyroscope(180)) {
public boolean runsWhenDisabled() {
return true;
};
};
SmartDashboard.putData("set gyro 180", setGyroTo180);
// new Trigger(driverController::getCrossButton).onTrue(new autoAimParallel(driveTrain/*, shooter*/));
new Trigger(ZeroGyroSup).onTrue(new InstantCommand(driveTrain::zeroGyroscope));
// new Trigger(driverController::getCircleButton).whileTrue(new GoToAmp(driveTrain)); unused becuase we dont pickup from amp with a path anymore
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/frc/robot/settings/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -466,14 +466,14 @@ public final class Field{

public static final double CALCULATED_SHOOTER_RED_SPEAKER_X = AMP_SIDE_OUTER_TAPE_CORNER_RED_X+3.213;
public static final double CALCULATED_RED_SPEAKER_Y = AMP_SIDE_OUTER_TAPE_CORNER_RED_Y+1.263;
public static final double RED_SPEAKER_Y = 5.68;//home field: 5.613 HCPA: 5.68
public static final double SHOOTER_RED_SPEAKER_X = 16.55;//home field: 16.582 HCPA: 16.55
public static final double RED_SPEAKER_Y = 5.58;//home field: 5.613 HCPA: 5.68
public static final double SHOOTER_RED_SPEAKER_X = 16.5;//home field: 16.582 HCPA: 16.55
public static final double ROBOT_RED_SPEAKER_X = SHOOTER_RED_SPEAKER_X-0.165;//changed so that shots from the side wil aim to the opposite side, and bank in

public static final double CALCULATED_SHOOTER_BLUE_SPEAKER_X = AMP_SIDE_OUTER_TAPE_CORNER_BLUE_X-3.213; //changed so that shots from the side wil aim to the opposite side, and bank in
public static final double CALCULATED_BLUE_SPEAKER_Y = AMP_SIDE_OUTER_TAPE_CORNER_BLUE_Y+1.263;
public static final double BLUE_SPEAKER_Y = 5.348;//home field: HCPA: 5.348
public static final double SHOOTER_BLUE_SPEAKER_X = 0.13; //HCPA: 0.13
public static final double BLUE_SPEAKER_Y = 5.372;//home field: HCPA: 5.348
public static final double SHOOTER_BLUE_SPEAKER_X = -0.03; //HCPA: 0.13
public static final double ROBOT_BLUE_SPEAKER_X = SHOOTER_BLUE_SPEAKER_X+0.2;

public static final double SPEAKER_Z = 2.08;//1.5;//1.8;//2.08; //height of opening. Changed so that the smaller spekeaker_x shots will still go in
Expand Down

0 comments on commit 1285e3f

Please sign in to comment.