Skip to content

Commit

Permalink
Updated Remap
Browse files Browse the repository at this point in the history
  • Loading branch information
EuphoniumPlayer committed Mar 6, 2024
2 parents 43ecc28 + 624c997 commit bb11261
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public static class MechanismConstants {
public static final int FLYWHEEL_MOTOR_2 = 4;
public static final boolean FLYWHEEL_MOTOR_1_INVERTED = true;
public static final boolean FLYWHEEL_MOTOR_2_INVERTED = false;
public static final double FLYWHEEL_MOTOR_SPEED = 0.8;
public static final double FLYWHEEL_MOTOR_SPEED = 1.0;
public static final double FLYWHEEL_MOTOR_SPEED_SLOW = 0.15;
}
}
5 changes: 3 additions & 2 deletions src/main/java/frc/robot/commands/FlyWCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ public void execute() {
m_FlyWSubsystem.enableflywheel();
} else if (FlyWJoystick.getRawButton(7) == true) {
m_FlyWSubsystem.reverseflywheel();
System.out.println("Flywheels Moving in Reverse");
System.out.println("Conveyor Moving in Reverse");
} else if (ConveyorJoystick.getRawButton(9) == true) {
m_FlyWSubsystem.enableflywheelslow();
} else {
m_FlyWSubsystem.disableflywheel();
}
Expand All @@ -37,7 +39,6 @@ public void execute() {
@Override
public void end(boolean interrupted) {
m_FlyWSubsystem.disableflywheel();
m_FlyWSubsystem.enableflywheel();
}

@Override
Expand Down
12 changes: 9 additions & 3 deletions src/main/java/frc/robot/subsystems/FlyWheel.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ public FlyWheel() {
}

/** Sets the flywheel motors to 100% power. */
public void enableflywheel() {
public void enableflywheelfast() {
flywheelMotor1.set(MechanismConstants.FLYWHEEL_MOTOR_SPEED);
flywheelMotor2.set(MechanismConstants.FLYWHEEL_MOTOR_SPEED);
}

/** Sets the flywheel motors to slow speed */
public void enableflywheelslow() {
flywheelMotor1.set(MechanismConstants.FLYWHEEL_MOTOR_SPEED_SLOW);
flywheelMotor2.set(MechanismConstants.FLYWHEEL_MOTOR_SPEED_SLOW);
}

/** Sets the flywheel motors to 0% power. */
public void disableflywheel() {
flywheelMotor1.set(0);
Expand All @@ -36,8 +42,8 @@ public void disableflywheel() {

/** Sets the flywheel motors to -100% power. (Reverse direction) */
public void reverseflywheel() {
flywheelMotor1.set(-MechanismConstants.FLYWHEEL_MOTOR_SPEED);
flywheelMotor2.set(-MechanismConstants.FLYWHEEL_MOTOR_SPEED);
flywheelMotor1.set(-MechanismConstants.FLYWHEEL_MOTOR_SPEED_SLOW);
flywheelMotor2.set(-MechanismConstants.FLYWHEEL_MOTOR_SPEED_SLOW);
}

@Override
Expand Down

0 comments on commit bb11261

Please sign in to comment.