Skip to content
This repository was archived by the owner on Nov 29, 2024. It is now read-only.

Piece selector fix#52

Open
oliverstivers wants to merge 6 commits intomasterfrom
piece-selector-fix
Open

Piece selector fix#52
oliverstivers wants to merge 6 commits intomasterfrom
piece-selector-fix

Conversation

@oliverstivers
Copy link
Copy Markdown
Contributor

Essentially swapped all game piece enums to booleans. True for cone, false for cube. I tried to get to everything that used it. We now can use boolean suppliers and i believe things should behave as expected.

@silverlightning926
Copy link
Copy Markdown
Contributor

This doesn't implement the auto piece intake in CrocodileDefault as well but that can be done in a different commit. We just need to remember to.

@oliverstivers
Copy link
Copy Markdown
Contributor Author

This doesn't implement the auto piece intake in CrocodileDefault as well but that can be done in a different commit. We just need to remember to.

it should implement, look in the execute. We can check the piece in there every loop, but we can't do so with the presets because they don't have an execute

Copy link
Copy Markdown
Member

@mikemag mikemag left a comment

Choose a reason for hiding this comment

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

So, yea, per our Slack conversation, you might prefer Supplier<T> instead of the #truefalsewhichway. It would be a smaller PR, and keep the code clear.

And for the love of all that is good and pure, press the Format Document button!!!! :)

crocodile.setWristToPositionCommand(WristPosition.CONE_SCORE).withTimeout(2)

);
deadlineWith(new RunCommand(() -> crocodile.setIntakeSpeed(MathUtil.clamp((0.25 + intake.getAsDouble()), -1, 1) * multiplier)));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Whoa, this doesn't do anything. Pop quiz for why, and why it's not a compiler nor runtime error.

It also seems unrelated to this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Why doesn't it do anything? Is it the run Command?

new RotatorToPosition(rotator, telescope, 90).withTimeout(2),
crocodile.setWristToPositionCommand(WristPosition.CONE_SCORE).withTimeout(2)
);
deadlineWith(new RunCommand(() -> crocodile.setIntakeSpeed(0.25 * multiplier)));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Again, nop.

@oliverstivers
Copy link
Copy Markdown
Contributor Author

So, yea, per our Slack conversation, you might prefer Supplier<T> instead of the #truefalsewhichway. It would be a smaller PR, and keep the code clear.

And for the love of all that is good and pure, press the Format Document button!!!! :)

We are working on a fix for that, in a branch off main

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants