Skip to content

[examples] Add compilable code snippets #7909

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sciencewhiz
Copy link
Contributor

This enables frc-docs to use RLIs for things that are currently in-line code blocks, and ensures they compile, which is important with the 2027 breaking changes coming. They are kept separate from the examples to ensure they don't polute the VSCode examples finder.

Adds the Encoder snippets used in the frc-docs Encoder article as the first instance of this.

This enables frc-docs to use RLIs for things that are currently in-line
code blocks, and ensures they compile, which is important with the 2027
breaking changes coming. They are kept separate from the examples to
ensure they don't polute the VSCode examples finder.

Adds the Encoder snippets used in the frc-docs Encoder article as the
first instance of this.
@Starlight220
Copy link
Member

Perhaps add links from the JSON to pages where the snippets are used? That would give a greater view of what snippets are actually being used etc

@sciencewhiz
Copy link
Contributor Author

Perhaps add links from the JSON to pages where the snippets are used? That would give a greater view of what snippets are actually being used etc

I'm not sure I'm following the use case


void TeleopPeriodic() override {
// Gets the distance traveled
m_encoder.GetDistance();
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to show return values here? (I know we'll need to disable unused variable warnings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants