Skip to content

Commit

Permalink
Make MonitoredSubsystem an abstract class to force users to override …
Browse files Browse the repository at this point in the history
…monitoredPeriodic
  • Loading branch information
aidnem committed Nov 25, 2024
1 parent 1e4ae8c commit 35f0f5d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.List;
import org.littletonrobotics.junction.Logger;

public class MonitoredSubsystem extends SubsystemBase {
public abstract class MonitoredSubsystem extends SubsystemBase {
private List<Monitor> registeredMonitors = new ArrayList<Monitor>();

private boolean loggingEnabled = true;
Expand All @@ -33,7 +33,7 @@ public void periodic() {
* try to be consistent within their own codebases about which responsibilities will be handled
* by Commands, and which will be handled here.
*/
public void monitoredPeriodic() {}
public abstract void monitoredPeriodic();

private void runMonitors() {
registeredMonitors.forEach(
Expand Down

0 comments on commit 35f0f5d

Please sign in to comment.