diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 018127e..f3e0b19 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -50,9 +50,36 @@ public RobotContainer(RobotRunType runtimeType) { // drivetrain = new Drivetrain(new DrivetrainSim() {}); break; default: - driveTrain = new Drivetrain(new DrivetrainIO() {}); - intake = new Intake(new IntakeIO() {}); - randMot = new RandomMotors(new RandomMotorsIO() {}); + driveTrain = new Drivetrain(new DrivetrainIO() { + + @Override + public void updateInputsIO(DrivetrainIOInputs inputs) { + + } + + @Override + public void setDrivePowerIO(double lvolts, double rvolts) { + + } + }); + intake = new Intake(new IntakeIO() { + + @Override + public void updateInputsIO(IntakeIOInputs inputs) { + + } + + @Override + public void setIntakePowerIO(double power) {} + }); + randMot = new RandomMotors(new RandomMotorsIO() { + + @Override + public void updateInputsIO(RandomMotorsIOInputs inputs) {} + + @Override + public void runMotorIO(double voltage) {} + }); } // Configure the button bindings configureButtonBindings(); @@ -76,7 +103,6 @@ private void configureButtonBindings() { } - /** * Gets the user's selected autonomous command. * diff --git a/src/main/java/frc/robot/subsystems/RandomMotors/RandomMotorsIO.java b/src/main/java/frc/robot/subsystems/RandomMotors/RandomMotorsIO.java index 3ce5876..8596209 100644 --- a/src/main/java/frc/robot/subsystems/RandomMotors/RandomMotorsIO.java +++ b/src/main/java/frc/robot/subsystems/RandomMotors/RandomMotorsIO.java @@ -14,11 +14,9 @@ public static class RandomMotorsIOInputs { } - public default void updateInputsIO(RandomMotorsIOInputs inputs) {} + public void updateInputsIO(RandomMotorsIOInputs inputs); + + public void runMotorIO(double voltage); - public default void runMotorIO(double voltage) {} - public default double encoder() { - return 0; - } } diff --git a/src/main/java/frc/robot/subsystems/RandomMotors/RandomMotorsReal.java b/src/main/java/frc/robot/subsystems/RandomMotors/RandomMotorsReal.java index 6cece45..950bdb1 100644 --- a/src/main/java/frc/robot/subsystems/RandomMotors/RandomMotorsReal.java +++ b/src/main/java/frc/robot/subsystems/RandomMotors/RandomMotorsReal.java @@ -29,7 +29,8 @@ public void updateInputsIO(RandomMotorsIOInputs inputs) { } - public void runMotor(double power) { + @Override + public void runMotorIO(double power) { neo.set(power); falcon.set(power); } diff --git a/src/main/java/frc/robot/subsystems/drive/Drivetrain.java b/src/main/java/frc/robot/subsystems/drive/Drivetrain.java index 5905a61..ad105ed 100644 --- a/src/main/java/frc/robot/subsystems/drive/Drivetrain.java +++ b/src/main/java/frc/robot/subsystems/drive/Drivetrain.java @@ -31,7 +31,7 @@ public void setPower(double lPower, double rPower) { } public Command driveCommand(CommandXboxController controller) { - return run(() -> setPower(controller.getLeftY(), controller.getRightY())); + return run(() -> {setPower(controller.getLeftY(), controller.getRightY());}); } } diff --git a/src/main/java/frc/robot/subsystems/drive/DrivetrainIO.java b/src/main/java/frc/robot/subsystems/drive/DrivetrainIO.java index 3ccf8b7..ab5ceba 100644 --- a/src/main/java/frc/robot/subsystems/drive/DrivetrainIO.java +++ b/src/main/java/frc/robot/subsystems/drive/DrivetrainIO.java @@ -18,10 +18,10 @@ public static class DrivetrainIOInputs { } /** Updates the set of loggable inputs. */ - public default void updateInputsIO(DrivetrainIOInputs inputs) {} + public void updateInputsIO(DrivetrainIOInputs inputs); /** Run the motor at the specified voltage. */ - public default void setDrivePowerIO(double lvolts, double rvolts) {} + public void setDrivePowerIO(double lvolts, double rvolts); } diff --git a/src/main/java/frc/robot/subsystems/drive/DrivetrainReal.java b/src/main/java/frc/robot/subsystems/drive/DrivetrainReal.java index 94d130f..2428fd7 100644 --- a/src/main/java/frc/robot/subsystems/drive/DrivetrainReal.java +++ b/src/main/java/frc/robot/subsystems/drive/DrivetrainReal.java @@ -35,7 +35,8 @@ public void updateInputsIO(DrivetrainIOInputs inputs) { /** * Drive Voltage */ - public void setDrivePower(double lvolts, double rvolts) { + @Override + public void setDrivePowerIO(double lvolts, double rvolts) { FLMotor.set(lvolts); FRMotor.set(rvolts); } diff --git a/src/main/java/frc/robot/subsystems/intake/intakeIO.java b/src/main/java/frc/robot/subsystems/intake/intakeIO.java index 4c823fb..1a02560 100644 --- a/src/main/java/frc/robot/subsystems/intake/intakeIO.java +++ b/src/main/java/frc/robot/subsystems/intake/intakeIO.java @@ -11,9 +11,9 @@ public static class IntakeIOInputs { } /** Updates the set of loggable inputs. */ - public default void updateInputsIO(IntakeIOInputs inputs) {} + public void updateInputsIO(IntakeIOInputs inputs); - public default void setIntakePowerIO(double power) {} + public void setIntakePowerIO(double power); } diff --git a/src/main/java/frc/robot/subsystems/intake/intakeReal.java b/src/main/java/frc/robot/subsystems/intake/intakeReal.java index 9ac4364..1b8e38b 100644 --- a/src/main/java/frc/robot/subsystems/intake/intakeReal.java +++ b/src/main/java/frc/robot/subsystems/intake/intakeReal.java @@ -13,7 +13,8 @@ public intakeReal() { leftIntake.addFollower(rightIntake); } - public void setIntakePower(double power) { + @Override + public void setIntakePowerIO(double power) { leftIntake.set(power); }