Skip to content

Commit

Permalink
paths
Browse files Browse the repository at this point in the history
  • Loading branch information
cherriae committed Mar 14, 2024
1 parent d490dc3 commit 554c564
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/main/deploy/pathplanner/autos/2 Piece Auton C.auto
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
"data": {
"name": "shoot"
}
},
{
"type": "path",
"data": {
"pathName": "initiate"
}
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/subsystems/ShooterSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public ShooterSubsystem() {
softLimits.ForwardSoftLimitThreshold = 69 * Constants.Physical.SHOOTER_ANGLE_GEAR_RATIO / 360;
softLimits.ReverseSoftLimitThreshold = -25 * Constants.Physical.SHOOTER_ANGLE_GEAR_RATIO / 360;

softLimits.ForwardSoftLimitEnable = false;
softLimits.ReverseSoftLimitEnable = false;
softLimits.ForwardSoftLimitEnable = true;
softLimits.ReverseSoftLimitEnable = true;

_angleMotor.getConfigurator().apply(softLimits);

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/frc/robot/subsystems/VisionSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ public double getLatency() {
* @see Optional
*/
public Optional<Pose2d> getBotpose() {
// return Optional.empty();

if (!isApriltagVisible()) return Optional.empty();

NetworkTableEntry botpose_entry = _limelight.getEntry("botpose_wpiblue");
Expand All @@ -71,7 +73,7 @@ public Optional<Pose2d> getBotpose() {
int tags = (int) botpose_array[7];
double distance = botpose_array[9];

if (tags < 2) return Optional.empty();
// if (tags < 2) return Optional.empty();
if (distance > FieldConstants.TAG_DISTANCE_THRESHOLD) return Optional.empty();

double botposeX = _xFilter.calculate(botpose_array[0]); // to get rid of the weird origin outlier
Expand Down

0 comments on commit 554c564

Please sign in to comment.