Skip to content

Commit

Permalink
Reformat files according to Google Java Formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
edreed committed Mar 15, 2024
1 parent 86bcad4 commit e7e46cc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 34 deletions.
2 changes: 0 additions & 2 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.InstantCommand;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import edu.wpi.first.wpilibj2.command.button.Trigger;
import frc.robot.Constants.RobotConstants.OperatorConstants;
Expand All @@ -35,7 +34,6 @@
import frc.robot.commands.Pathfinding;
import frc.robot.commands.SetShooterContinous;
import frc.robot.subsystems.ArmSubsystem;
import frc.robot.subsystems.ClimberSubsystem;
import frc.robot.subsystems.IndexerSubsystem;
import frc.robot.subsystems.ShooterSubsystem;
import frc.robot.subsystems.StatusLEDSubsystem;
Expand Down
69 changes: 37 additions & 32 deletions src/main/java/frc/robot/commands/ClimberCommands.java
Original file line number Diff line number Diff line change
@@ -1,46 +1,51 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.

/*
* Copyright (c) 2024 Newport Robotics Group. All Rights Reserved.
*
* Open Source Software; you can modify and/or share it under the terms of
* the license file in the root directory of this project.
*/
package frc.robot.commands;

import java.util.Optional;

import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands;
import frc.robot.subsystems.ClimberSubsystem;
import frc.robot.subsystems.Subsystems;
import java.util.Optional;

/** Commands to wind and undwind the climber subsystem on the chain. */
public class ClimberCommands {

/**
* Returns a command to manually wind the climber.
* @param subsystems The subsystems container.
* @return A command to manually wind the climber.
*/
public static Command manualClimbChain(Subsystems subsystems) {
Optional<ClimberSubsystem> climber = subsystems.climber;

if (climber.isEmpty()) {
return Commands.none();
}

return Commands.run(() -> climber.get().wind(), climber.get()).finallyDo(() -> climber.get().stopMotors());
/**
* Returns a command to manually wind the climber.
*
* @param subsystems The subsystems container.
* @return A command to manually wind the climber.
*/
public static Command manualClimbChain(Subsystems subsystems) {
Optional<ClimberSubsystem> climber = subsystems.climber;

if (climber.isEmpty()) {
return Commands.none();
}

/**
* Returns a command to manually unwind the climber.
* @param subsystems The subsystems container.
* @return A command to manually unwind the climber.
*/
public static Command manualClimbDownChain(Subsystems subsystems) {
Optional<ClimberSubsystem> climber = subsystems.climber;

if (climber.isEmpty()) {
return Commands.none();
}

return Commands.run(() -> climber.get().unwind(), climber.get()).finallyDo(() -> climber.get().stopMotors());
return Commands.run(() -> climber.get().wind(), climber.get())
.finallyDo(() -> climber.get().stopMotors());
}

/**
* Returns a command to manually unwind the climber.
*
* @param subsystems The subsystems container.
* @return A command to manually unwind the climber.
*/
public static Command manualClimbDownChain(Subsystems subsystems) {
Optional<ClimberSubsystem> climber = subsystems.climber;

if (climber.isEmpty()) {
return Commands.none();
}

return Commands.run(() -> climber.get().unwind(), climber.get())
.finallyDo(() -> climber.get().stopMotors());
}
}

0 comments on commit e7e46cc

Please sign in to comment.