Skip to content

Bugfix/pathplanner jit loop overrun#602

Open
JRTaylord wants to merge 3 commits into
event/worldsfrom
bugfix/pathplanner-JIT-loop-overrun
Open

Bugfix/pathplanner jit loop overrun#602
JRTaylord wants to merge 3 commits into
event/worldsfrom
bugfix/pathplanner-JIT-loop-overrun

Conversation

@JRTaylord

Copy link
Copy Markdown
Contributor

No description provided.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Solid approach to the JIT loop-overrun problem. The removeComposedCommand workaround is well-documented and the onEnable() cancel ensures the warmup is always torn down before auto starts. One potential crash to address.

superStructure.setWantedSuperState(SuperWantedStates.DEFAULT);
superStructure.setIntakeState(IntakeWantedStates.IDLE);
});
autoWarmupCommand = Commands.sequence(selectedAuto, resetToDefault).ignoringDisable(true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

autoChooser.getSelected() can return null if the auto has not finished building or on a timing edge. Passing null as the first argument to Commands.sequence will throw a NullPointerException and crash disabledPeriodic. Add a null guard before constructing the sequence: if (selectedAuto == null) return;

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.

1 participant