Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Merridew1 committed Dec 3, 2024
1 parent 8fd2227 commit 9ef4efc
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 17 deletions.
34 changes: 30 additions & 4 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -76,7 +103,6 @@ private void configureButtonBindings() {
}



/**
* Gets the user's selected autonomous command.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/subsystems/drive/Drivetrain.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());});
}

}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/subsystems/drive/DrivetrainIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);


}
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/subsystems/drive/DrivetrainReal.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/subsystems/intake/intakeIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}

3 changes: 2 additions & 1 deletion src/main/java/frc/robot/subsystems/intake/intakeReal.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public intakeReal() {
leftIntake.addFollower(rightIntake);
}

public void setIntakePower(double power) {
@Override
public void setIntakePowerIO(double power) {
leftIntake.set(power);
}

Expand Down

0 comments on commit 9ef4efc

Please sign in to comment.