Skip to content

Commit

Permalink
remember to scale drive values
Browse files Browse the repository at this point in the history
  • Loading branch information
willitcode committed Mar 21, 2024
1 parent 24d9cf5 commit d91c8c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/frc/robot/commands/AimWithLimelight.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private double getRotation() {
if (rot > speedLimit) {
rot = speedLimit;
}
return rot;
return rot * drive.getMaximumAngularSpeed();
}

/**
Expand All @@ -113,7 +113,10 @@ private double getRotation() {
* the target.
*/
private double getX() {
return getCurrentDistance() * driveStrength;
if (getCurrentDistance() > speedLimit) {
return speedLimit * driveStrength * drive.getMaximumSpeed();
}
return getCurrentDistance() * driveStrength * drive.getMaximumSpeed();
}

/**
Expand Down

0 comments on commit d91c8c0

Please sign in to comment.