Skip to content

Commit

Permalink
Merge branch 'vaash-control-prep' into auto-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
m10653 committed Feb 29, 2024
2 parents d415c17 + f55306e commit 526e244
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/jmhsrobotics/frc2024/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static class SwerveConstants {
public static final double kMaxSpeedFeetPerSecond = 14;

// configure to change drivetrain slow mode
public static final double slowSpeedFeetPerSecond = 8; // TODO: Remove used when not in turbo mode move to Comp
public static final double slowSpeedFeetPerSecond = 12; // TODO: Remove used when not in turbo mode move to Comp
// control later after refactor

// configure to change rotation speed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ public class CompControl implements ControlBoard {
// =============Driver Controls=============
private double slowSpeedFps = Constants.SwerveConstants.slowSpeedFeetPerSecond;
private double slowMode = slowSpeedFps / Constants.SwerveConstants.kMaxSpeedFeetPerSecond;

private boolean isTurbo() {
return this.driver.getAButton();
// return this.driver.getAButton();
// return new Trigger(() -> {
return driver.getRightTriggerAxis() > 0.5;
// }); //
}

@Override
public double xInput() {
return this.driver.getLeftX() * (isTurbo() ? 1.0 : slowMode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void initialize() {
@Override
public void execute() {
this.intakeSubsystem.set(1);
this.shooterSubsystem.set(0.2, ControlType.VOLTAGE);
this.shooterSubsystem.set(0.2 * 12, ControlType.VOLTAGE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package org.jmhsrobotics.frc2024.subsystems.intake.commands;

import org.jmhsrobotics.frc2024.subsystems.intake.IntakeSubsystem;
import org.jmhsrobotics.frc2024.subsystems.shooter.ShooterSubsystem;
import org.jmhsrobotics.frc2024.subsystems.shooter.ShooterSubsystem.ControlType;

import edu.wpi.first.wpilibj2.command.Command;

Expand Down

0 comments on commit 526e244

Please sign in to comment.