diff --git a/build.gradle b/build.gradle index 675284f1..7a31b87d 100644 --- a/build.gradle +++ b/build.gradle @@ -109,7 +109,7 @@ spotless { } java { - licenseHeader '// Copyright (c) FIRST and other WPILib contributors.\n// Open Source Software; you can modify and/or share it under the terms of\n// the WPILib BSD license file in the root directory of this project.\n\n/*\n * Asimov\'s Laws:\n * The First Law: A robot may not injure a human being or, through inaction, allow a human being to come to harm.\n * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law.\n * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.\n */' + licenseHeader '// Copyright (c) FIRST and other WPILib contributors.\n// Open Source Software; you can modify and/or share it under the terms of\n// the WPILib BSD license file in the root directory of this project.\n\n/*\n * Asimov\'s Laws:\n * The First Law: A robot may not injure a human being or, through inaction, allow a human being to come to harm.\n * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law.\n * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.\n */\n\n' removeUnusedImports() formatAnnotations() googleJavaFormat().reflowLongStrings() diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 05183a7f..2337681c 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -8,6 +8,7 @@ * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. */ + package frc.robot; /** diff --git a/src/main/java/frc/robot/Main.java b/src/main/java/frc/robot/Main.java index 5b5338fc..eab963e7 100644 --- a/src/main/java/frc/robot/Main.java +++ b/src/main/java/frc/robot/Main.java @@ -8,6 +8,7 @@ * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. */ + package frc.robot; import edu.wpi.first.wpilibj.RobotBase; diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index 66225b83..302be34a 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -8,6 +8,7 @@ * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. */ + package frc.robot; import edu.wpi.first.wpilibj.TimedRobot; diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 6b1d93b1..a8c689dc 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -8,6 +8,7 @@ * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. */ + package frc.robot; import edu.wpi.first.math.MathUtil; @@ -40,9 +41,9 @@ public class RobotContainer { */ /* For now, we don't make commands public static, as there isn't really a reason to. */ - private final DriveRobotOriented driveRobotOriented = new DriveRobotOriented(drive); - private final DriveFieldOriented driveFieldOriented = new DriveFieldOriented(drive); - private final EnterXMode enterXMode = new EnterXMode(drive); + private final DriveRobotOriented driveRobotOriented = new DriveRobotOriented(); + private final DriveFieldOriented driveFieldOriented = new DriveFieldOriented(); + private final EnterXMode enterXMode = new EnterXMode(); /* * *********************** diff --git a/src/main/java/frc/robot/commands/DriveFieldOriented.java b/src/main/java/frc/robot/commands/DriveFieldOriented.java index d496024c..ce198e0d 100644 --- a/src/main/java/frc/robot/commands/DriveFieldOriented.java +++ b/src/main/java/frc/robot/commands/DriveFieldOriented.java @@ -8,6 +8,7 @@ * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. */ + package frc.robot.commands; import edu.wpi.first.wpilibj2.command.Command; @@ -18,8 +19,8 @@ public class DriveFieldOriented extends Command { private final Drive drive; /** Creates a new DriveFieldOriented. */ - public DriveFieldOriented(Drive drive) { - this.drive = drive; + public DriveFieldOriented() { + this.drive = RobotContainer.drive; addRequirements(drive); } diff --git a/src/main/java/frc/robot/commands/DriveRobotOriented.java b/src/main/java/frc/robot/commands/DriveRobotOriented.java index 2e0e89b4..82e758e7 100644 --- a/src/main/java/frc/robot/commands/DriveRobotOriented.java +++ b/src/main/java/frc/robot/commands/DriveRobotOriented.java @@ -8,6 +8,7 @@ * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. */ + package frc.robot.commands; import edu.wpi.first.wpilibj2.command.Command; @@ -18,8 +19,8 @@ public class DriveRobotOriented extends Command { private final Drive drive; /** Creates a new DriveRobotOriented. */ - public DriveRobotOriented(Drive drive) { - this.drive = drive; + public DriveRobotOriented() { + this.drive = RobotContainer.drive; addRequirements(drive); } diff --git a/src/main/java/frc/robot/commands/EnterXMode.java b/src/main/java/frc/robot/commands/EnterXMode.java index 4d035f04..571af348 100644 --- a/src/main/java/frc/robot/commands/EnterXMode.java +++ b/src/main/java/frc/robot/commands/EnterXMode.java @@ -8,9 +8,11 @@ * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. */ + package frc.robot.commands; import edu.wpi.first.wpilibj2.command.Command; +import frc.robot.RobotContainer; import frc.robot.subsystems.Drive; public class EnterXMode extends Command { @@ -18,8 +20,8 @@ public class EnterXMode extends Command { private Drive drive; /** Creates a new EnterXMode. */ - public EnterXMode(Drive drive) { - this.drive = drive; + public EnterXMode() { + this.drive = RobotContainer.drive; addRequirements(drive); // Use addRequirements() here to declare subsystem dependencies. } diff --git a/src/main/java/frc/robot/subsystems/Drive.java b/src/main/java/frc/robot/subsystems/Drive.java index 0d88c0dd..f1914cb5 100644 --- a/src/main/java/frc/robot/subsystems/Drive.java +++ b/src/main/java/frc/robot/subsystems/Drive.java @@ -8,6 +8,7 @@ * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. */ + package frc.robot.subsystems; import edu.wpi.first.math.geometry.Translation2d;