Skip to content

Commit

Permalink
removal(elevator): code from reefscape
Browse files Browse the repository at this point in the history
  • Loading branch information
OmyDaGreat committed Jan 18, 2025
1 parent 3f25b60 commit c48ac7e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 81 deletions.
16 changes: 0 additions & 16 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package frc.robot;

import static frc.robot.utils.Direction.*;
import static frc.robot.utils.ElevatorState.*;
import static frc.robot.commands.Kommand.*;

import com.pathplanner.lib.auto.NamedCommands;
import com.pathplanner.lib.commands.PathPlannerAuto;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.button.*;
Expand Down Expand Up @@ -47,13 +44,6 @@ public RobotContainer() {

configureBindings();

NamedCommands.registerCommand("scoreLeft", score(LEFT));
NamedCommands.registerCommand("scoreRight", score(RIGHT));
NamedCommands.registerCommand("SetL1", setElevatorState(L1));
NamedCommands.registerCommand("SetL2", setElevatorState(L2));
NamedCommands.registerCommand("SetL3", setElevatorState(L3));
NamedCommands.registerCommand("SetL4", setElevatorState(L4));

networkChooser.addDefaultOption("Do Nothing", new PathPlannerAuto("Straight Auto"));
}

Expand All @@ -68,12 +58,6 @@ public RobotContainer() {
private void configureBindings() {
padStart.onTrue(resetPidgey()); // Prev Button: padB
padY.onTrue(setTelePid());
// padA.onTrue(setElevatorState(L1));
// padB.onTrue(setElevatorState(L2));
// padX.onTrue(setElevatorState(L3));
// padY.onTrue(setElevatorState(L4));
padLeftBumper.onTrue(score(LEFT));
padRightBumper.onTrue(score(RIGHT));
}

public Command getAutonomousCommand() {
Expand Down
46 changes: 0 additions & 46 deletions src/main/java/frc/robot/commands/Kommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ package frc.robot.commands
import com.pathplanner.lib.commands.PathPlannerAuto
import edu.wpi.first.wpilibj2.command.InstantCommand
import edu.wpi.first.wpilibj2.command.WaitCommand
import frc.robot.commands.sequencing.AutomaticScore
import frc.robot.subsystems.CoralManipulator
import frc.robot.subsystems.Elevator
import frc.robot.subsystems.Swerve
import frc.robot.utils.Direction
import frc.robot.utils.ElevatorState
import frc.robot.utils.RobotParameters.SwerveParameters
import frc.robot.utils.RobotParameters.SwerveParameters.Thresholds
import frc.robot.utils.controller.GamingController
Expand All @@ -20,48 +16,6 @@ import frc.robot.utils.controller.GamingController
* This is called for instant commands instead of functions
*/
object Kommand {
/**
* Creates an [InstantCommand] to set the state of the elevator.
*
* @param state The desired state of the elevator.
* @return An [InstantCommand] that sets the elevator state.
*/
@JvmStatic
fun setElevatorState(state: ElevatorState) = InstantCommand({ Elevator.getInstance().state = state })

/**
* Creates an [InstantCommand] to move the elevator to a specific level.
*
* @return An [InstantCommand] that moves the elevator to a specific level.
*/
@JvmStatic
fun moveElevatorToLevel() = InstantCommand({ Elevator.getInstance().moveElevatorToLevel() })

/**
* Creates an [InstantCommand] to start the coral manipulator motors.
*
* @return An [InstantCommand] that starts the coral manipulator motors.
*/
@JvmStatic
fun startCoralManipulator() = InstantCommand({ CoralManipulator.getInstance().setHasPiece(false) })

/**
* Creates an [InstantCommand] to stop the coral manipulator motors.
*
* @return An [InstantCommand] that stops the coral manipulator motors.
*/
@JvmStatic
fun stopCoralManipulator() = InstantCommand({ CoralManipulator.getInstance().stopMotors() })

/**
* Wraps [AutomaticScore] to score in a specified direction.
*
* @param dir The direction in which to score.
* @return An [AutomaticScore] that performs the scoring action.
*/
@JvmStatic
fun score(dir: Direction) = AutomaticScore(dir)

/**
* Creates an [AlignSwerve] command to align the robot in a specified direction.
*
Expand Down
19 changes: 0 additions & 19 deletions src/main/java/frc/robot/utils/ElevatorState.java

This file was deleted.

0 comments on commit c48ac7e

Please sign in to comment.