Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to use command factories instead of public methods #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ajs256
Copy link
Member

@ajs256 ajs256 commented Dec 9, 2024

This sets up the drive subsystem to expose command factories, instead of public methods, for its functionality. This allows more visibility into what's causing the subsystem to do something, as well as protecting the state of the subsystem (allowing the command scheduler's requirements system to work).

@ajs256 ajs256 requested a review from cosyntxd December 9, 2024 21:58
.withName("tankDrive");
}

public void driveTank(double left, double right) {
Copy link
Contributor

Choose a reason for hiding this comment

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

is there supposed to be one that isn't a command.

m_solnoidRight.set(DoubleSolenoid.Value.kForward);
});
}

Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: make it a little more clear that these shift the speed and not like height or something. It makes sense now but maybe not when I am sleep deprived

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.

2 participants