Skip to content

Conversation

@SCool62
Copy link
Contributor

@SCool62 SCool62 commented Jan 12, 2026

Still WIP

@SCool62 SCool62 requested a review from spellingcat January 13, 2026 00:14
@SCool62 SCool62 marked this pull request as ready for review January 13, 2026 05:12
@SCool62
Copy link
Contributor Author

SCool62 commented Jan 13, 2026

I'm marking this as ready for review bc i'm not sure how done it needs to be. No mech-specific code in here, but the infrastructure for binding commands to states, and all the transitions are implemented. The button bindings are implemented but are just placeholders.

Copy link
Member

@spellingcat spellingcat left a comment

Choose a reason for hiding this comment

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

see the new graph i posted on #software in slack which i think simplifies things enough for the alpha

private void addTransitions() {
bindTransition(SuperState.IDLE, SuperState.INTAKE, intakeReq);

bindTransition(SuperState.INTAKE, SuperState.READY, intakeReq.negate().or(isFull));
Copy link
Member

Choose a reason for hiding this comment

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

add path from intake back to idle if it's empty and intake req is not true

Copy link
Member

Choose a reason for hiding this comment

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

intake -> ready needs to be when intakereq.negate().and(is not empty)

bindTransition(
SuperState.SCORE_FLOW, SuperState.READY, scoreReq.negate().and(isEmpty.negate()));

bindTransition(SuperState.SCORE_FLOW, SuperState.SCORE, scoreReq.and(continuousReq.negate()));
Copy link
Member

Choose a reason for hiding this comment

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

this is not that important but maybe put the bidirectional transitions next to each other


isFull = new Trigger(routing::isFull);

isEmpty = new Trigger(routing::isEmpty);
Copy link
Member

Choose a reason for hiding this comment

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

i might add an isPartial or something like that for when the second beambreak is true but first is not


bindTransition(SuperState.READY, SuperState.INTAKE, intakeReq.and(isFull.negate()));

bindTransition(SuperState.READY, SuperState.FEED, feedReq.and(continuousReq.negate()));
Copy link
Member

Choose a reason for hiding this comment

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

rename continuous to flowreq

.and(DriverStation::isTeleop)
.or(Autos.autoFeedReq);

continuousReq =
Copy link
Member

Choose a reason for hiding this comment

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

yknow, i might actually get rid of continuous req as a separate button and just do like (intake req and score req) in place of continous req

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