Skip to content

Commit

Permalink
Updated Files for Linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
J-The-Fox committed Feb 14, 2025
1 parent b29545b commit 6979483
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 37 deletions.
19 changes: 14 additions & 5 deletions src/main/java/frc/robot/commands/ExampleCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,41 @@
import edu.wpi.first.wpilibj2.command.Command;

/** An example command that uses an example subsystem. */
public class ExampleCommand extends Command {
public final class ExampleCommand extends Command {
@SuppressWarnings({"PMD.UnusedPrivateField", "PMD.SingularField"})

/**
* This is an example subsystem that should be used with this command
*/
private final ExampleSubsystem m_subsystem;
// This would need to bbe surpressed as it's not an actual error and it quite
// standard in some use cases such as this one

/**
* Creates a new ExampleCommand.
*
* @param subsystem The subsystem used by this command.
*/
public ExampleCommand(ExampleSubsystem subsystem) {
public ExampleCommand(final ExampleSubsystem subsystem) {
m_subsystem = subsystem;
// Use addRequirements() here to declare subsystem dependencies.
addRequirements(subsystem);
}

// Called when the command is initially scheduled.
@Override
public void initialize() {}
public void initialize() {
}

// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {}
public void execute() {
}

// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {}
public void end(final boolean interrupted) {
}

// Returns true when the command should end.
@Override
Expand Down
67 changes: 35 additions & 32 deletions src/main/java/frc/robot/subsystems/ExampleSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,43 @@
import edu.wpi.first.wpilibj2.command.SubsystemBase;

public class ExampleSubsystem extends SubsystemBase {
/** Creates a new ExampleSubsystem. */
public ExampleSubsystem() {}

/** Creates a new ExampleSubsystem. */
public ExampleSubsystem() {
}

/**
* Example command factory method.
*
* @return a command
*/
public Command exampleMethodCommand() {
// Inline construction of command goes here.
// Subsystem::RunOnce implicitly requires `this` subsystem.
return runOnce(
() -> {
/* one-time action goes here */
});
}
/**
* Example command factory method.
*
* @return a command
*/
public Command exampleMethodCommand() {
// Inline construction of command goes here.
// Subsystem::RunOnce implicitly requires `this` subsystem.
return runOnce(
() -> {
/* one-time action goes here */
});
}

/**
* An example method querying a boolean state of the subsystem (for example, a digital sensor).
*
* @return value of some boolean subsystem state, such as a digital sensor.
*/
public boolean exampleCondition() {
// Query some boolean state, such as a digital sensor.
return false;
}
/**
* An example method querying a boolean state of the subsystem (for
* example, a digital sensor).
*
* @return value of some boolean subsystem state, such as a digital sensor.
*/
public boolean exampleCondition() {
// Query some boolean state, such as a digital sensor.
return false;
}

@Override
public void periodic() {
// This method will be called once per scheduler run
}
@Override
public void periodic() {
// This method will be called once per scheduler run
}

@Override
public void simulationPeriodic() {
// This method will be called once per scheduler run during simulation
}
@Override
public void simulationPeriodic() {
// This method will be called once per scheduler run during simulation
}
}

0 comments on commit 6979483

Please sign in to comment.