@ConradSkelly
Use the keyword final for member variables that are created once during construction and never change through the life of the object. E.g. as long as the Shooter subsystem exists while the robot is running, it will have exactly one topMotor.
private final CANSparkMax topMotor;
The variable isReal should also be private and final since the robot doesn't change from simulated to real and back.
@ConradSkelly Use the keyword final for member variables that are created once during construction and never change through the life of the object. E.g. as long as the Shooter subsystem exists while the robot is running, it will have exactly one topMotor.
private final CANSparkMax topMotor;
The variable isReal should also be private and final since the robot doesn't change from simulated to real and back.
https://github.com/koibots8230/RumbleBot2024/blob/eef158144149c2a53edf250ccf615ac48a637772/RumbleBot2024/src/main/java/frc/robot/subsystems/Shooter.java#L24