Skip to content

Commit

Permalink
change set target velocity to set target percent in Shooter.java and …
Browse files Browse the repository at this point in the history
…add set target percent to Neo.java
  • Loading branch information
derp00monsta committed Jan 27, 2024
1 parent b4081e9 commit 61c9323
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/main/java/frc/robot/subsystems/Shooter.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public Command shoot(Pose2d position, boolean shootingAtSpeaker) {
SpeedAnglePair pair = calculateSpeed(position, shootingAtSpeaker);
return runOnce(() -> motorLeft.setTargetPercent(1));
}
//TODO: ask how line 54-56 will translate to a percent
//TODO: change terget velocity to target percent
//TODO: change target velocity to target percent
public Command stop() {
return runOnce(() -> motorLeft.setTargetPercent(0));
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/util/Neo.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void setTargetPercent(double percent, int slot) {
if (percent == 0) {
setVoltage(0);
} else {
setTargetVelocity((Math.abs(percent * RobotController.getBatteryVoltage())));
pidController.setReference(percent, ControlType.kDutyCycle);
}
targetPercent = percent;
controlType = ControlLoopType.PERCENT;
Expand Down

0 comments on commit 61c9323

Please sign in to comment.