Skip to content

Conversation

@mwitcpalek
Copy link
Contributor

No description provided.

public interface algaeIO{
public interface algaeIO {
@AutoLog
public static class IOInputs {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

name of this class should have algae in it (for clarity reasons otherwise it won't be clear which subsystem this compiled class belongs to)

@AutoLog
public static class IOInputs {
public AngularVelocity velocity;
public Angle location;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we change this to position to be consistent with other subsystems?

}
public void setPosition(double position) {
// Set the Talon FX to position control mode and set the target position
talonFX.setPosition(position);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Algae is not a position-based subsystem, it is a closedLoopSpeedSubsystem

you will want to setSpeed, not setPosiiton

you will have probably both a dutyCycle (open loop) control request, and a velocityDutyCycle request

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updateInputs should update all of the inputs: position, velocity, beam break
you should use the BaseStatusSignal.refreshAll() syntax to refresh all at once (see exampleSubsystem)

@mwitcpalek mwitcpalek merged commit 51bbc7e into main Feb 4, 2025
1 check passed
@mwitcpalek mwitcpalek deleted the algae branch February 4, 2025 00:45
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.

4 participants