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

Set arm and shooter in speaker command group #86

Merged
merged 8 commits into from
Feb 9, 2024

Conversation

j0ndough
Copy link
Contributor

@j0ndough j0ndough commented Feb 9, 2024

Why are we doing this?

Allows robot to dynamically adjust shooter arm position and shooter wheel rpm based on distance from speaker.

Asana task URL:

https://app.asana.com/0/38541457243752/1206397655151707

Whats changing?

Add SetArmAndShooterInSpeakerCommandGroup

Questions/notes for reviewers

How this was tested

  • unit tests added
  • tested on robot

@j0ndough j0ndough requested a review from a team as a code owner February 9, 2024 02:45
@@ -144,11 +145,12 @@ public void setupMobilityComands(

@Inject
public void scoringCommands(
SetArmAndShooterForAmpCommandGroup setArmAndShooterForAmpCommand
SetArmAndShooterForAmpCommandGroup setArmAndShooterForAmpCommand,
Copy link
Contributor

@stephenjust stephenjust Feb 9, 2024

Choose a reason for hiding this comment

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

Command group classes need @Inject on construvtors

@@ -4,6 +4,7 @@
import xbot.common.command.BaseSetpointCommand;

import javax.inject.Inject;
import javax.inject.Singleton;
Copy link
Contributor

Choose a reason for hiding this comment

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

Commands should generally not be Singletons, and importing isn't enough to make it one.

@@ -1,5 +1,8 @@
package competition.subsystems.shooter;

import javax.inject.Inject;
import javax.inject.Singleton;

public class ShooterDistanceToRpmConverter {
Copy link
Contributor

Choose a reason for hiding this comment

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

If you wanted this to be an injectable @Singleton you need to add that annotation to the class

Copy link
Contributor

Choose a reason for hiding this comment

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

Likewise the constructor would need the @Inject annotation.

@stephenjust stephenjust merged commit c209fd4 into main Feb 9, 2024
1 check passed
@stephenjust stephenjust deleted the SetArmAndShooterInSpeakerCommandGroup branch February 9, 2024 04:13
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