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

made auton delay #124

Merged
merged 6 commits into from
Mar 16, 2024
Merged

made auton delay #124

merged 6 commits into from
Mar 16, 2024

Conversation

Griffin9881
Copy link
Contributor

Pull Request


Issue Number

Closes #74

Comments

Copy link
Member

@reediculous456 reediculous456 left a comment

Choose a reason for hiding this comment

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

Did you see the code that I pushed? I think it will be a lot easier to work with from a DS standpoint and be more flexible

@Griffin9881
Copy link
Contributor Author

where did you push that code?

@reediculous456
Copy link
Member

@Griffin9881
Copy link
Contributor Author

Griffin9881 commented Mar 13, 2024

I feel like a dropdown would be fine since you wouldn't really have a situation where you needed to be more accurate than that. Although when we tested the code did not work Im not sure why not but it looks similar to yours just the WaitCommand is in a different spot

@reediculous456
Copy link
Member

Interesting, I would expect that to work

@Griffin9881
Copy link
Contributor Author

me too

@reediculous456
Copy link
Member

Does my branch work? I have a theory

@Griffin9881
Copy link
Contributor Author

both branches work now because i guess it had to be in the auton class, I would prefer to use my code because I think it would be easier than using a text box and also it was made by a student

@reediculous456
Copy link
Member

Ok. One thing you could do to reduce the overhead here is remove the enum and just assign the seconds straight to the options in the chooser. The only reason we don’t do that for autons is because we need to construct the auton in auto init not on robot init

@Griffin9881
Copy link
Contributor Author

Okay I can work on that tomorrow

matunkar
matunkar previously approved these changes Mar 14, 2024
@@ -21,6 +21,7 @@ public enum AutonChoices {

// Choosers
SendableChooser<AutonChoices> autoChooser;
SendableChooser<String> delayChooser;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
SendableChooser<String> delayChooser;
SendableChooser<double> delayChooser;

If you do this you don’t need the switch statement. You can just return the get value from the chooser

@reediculous456 reediculous456 merged commit f242044 into main Mar 16, 2024
1 check passed
@reediculous456 reediculous456 deleted the delay-auto-2 branch March 16, 2024 19:44
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.

3 participants