Skip to content

Update MotorSubsystem to not implement Motor or Encoder - #125

Merged
kcooney merged 5 commits into
mainfrom
kcooney/motor-subsystem-rewrite
Feb 1, 2026
Merged

Update MotorSubsystem to not implement Motor or Encoder#125
kcooney merged 5 commits into
mainfrom
kcooney/motor-subsystem-rewrite

Conversation

@kcooney

@kcooney kcooney commented Feb 1, 2026

Copy link
Copy Markdown
Contributor

This will hopefully discourage code outside of the subsystem from accessing
the motor APIs directly.

@kcooney
kcooney force-pushed the kcooney/motor-subsystem-rewrite branch from 4a476d6 to 3e26085 Compare February 1, 2026 09:38
@kcooney kcooney added this to the Version 2.0.0 Release milestone Feb 1, 2026

@cuttestkittensrule cuttestkittensrule left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty much good to go. There is something that was added which may be unnecessary, and a bug I noticed while reviewing this code.

For the bug, we could fix it in this PR, or I could just make a PR after this one merges that fixes it.

Comment thread lib/src/main/java/com/team2813/lib2813/subsystems/MotorSubsystem.java Outdated
Comment thread lib/src/main/java/com/team2813/lib2813/subsystems/MotorSubsystem.java Outdated
@cuttestkittensrule cuttestkittensrule linked an issue Feb 1, 2026 that may be closed by this pull request
@kcooney
kcooney force-pushed the kcooney/motor-subsystem-rewrite branch from 449a957 to 8dabb4a Compare February 1, 2026 21:26
The goal is to discourage code outside of the subsystem to directly interact
with the motor. Subclasses should instead provide public APIs for controlling
the subsystem, preferably via commands.
@kcooney
kcooney force-pushed the kcooney/motor-subsystem-rewrite branch from 32c0c8a to 1eacefa Compare February 1, 2026 23:04
@kcooney
kcooney merged commit 1caa802 into main Feb 1, 2026
1 check passed
@kcooney
kcooney deleted the kcooney/motor-subsystem-rewrite branch February 1, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MotorSubsystem should not implement Motor or Encoder

2 participants