Skip to content

Low-Level Base Controller: include blocks as firmware excerpts - #70

Merged
fjp merged 4 commits into
mainfrom
docs/low-level-code-block
Oct 30, 2026
Merged

fjp merged 4 commits into
mainfrom
docs/low-level-code-block

Conversation

@fjp

@fjp fjp commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

What and why

The #include block after "After including Remo-specific definitions" was indented by four spaces after a paragraph, so Markdown showed it as indented code, with its ```cpp fences as text. That block, the include block before it and the lib_deps block from platformio.ini were also copied by hand from the firmware.

All three are now excerpts of the real files, from the page's firmware pin (low_level_src_raw and low_level_src_url, from #64), each with a link to the same lines on GitHub:

  • main.cpp, lines 1–3: the ROS header and Remo's configuration
  • main.cpp, lines 4–5: the libraries from lib
  • platformio.ini, lines 27–34: the libraries of Remo's Teensy 4.0 environment

The encoder excerpt further down gets such a link too. The info box about the excerpts moves to the start of the section, before the first excerpt, and says which blocks it means: the firmware excerpts, the code blocks with a file name and line numbers. The code blocks of the high-level section further down are still copied by hand. They are part of the docs clean-up. The page's generator from #64 now writes these excerpts too. On a later run, it finds each excerpt by its introducing sentence and title, not by its line range, so a repin still works.

Preview

How it was checked

  • mkdocs build --strict against GitHub and codespell pass, and the built page contains no literal fences.
  • The generator gives the same page from this branch's previous state and on a second run. A repin test with every source file shifted by one line moves all ranges and links by one.
  • Rendered at 390 px light and 1440 px dark: no page-wide horizontal overflow, no JavaScript errors.

The block was indented after a paragraph, so Markdown showed it as plain indented code, with its
```cpp fences as text. It's a normal code block now.
@fjp fjp added the documentation Improvements or additions to documentation label Oct 29, 2026
@fjp fjp self-assigned this Oct 29, 2026
@fjp fjp moved this to In review in DiffBot & Remo roadmap Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.2
Preview removed because the pull request was closed.
2026-10-30 18:00 UTC

@fjp fjp added this to the Noetic: real robot validation milestone Oct 29, 2026
fjp added 3 commits October 30, 2026 17:28
The page's two include blocks and its lib_deps block were copied by hand from the firmware. They are now excerpts of main.cpp (lines 1–3 and 4–5) and of platformio.ini's teensy40 environment (lines 27–34), with links to the same lines, from the page's firmware pin. The encoder excerpt gets such a link too. The info box moves to the start of the section, before the first excerpt, and says which blocks it means: the firmware excerpts, the code blocks with a file name and line numbers. The code blocks of the high-level section further down are still copied by hand.

The generator now writes these excerpts as well. On a later run, it finds each excerpt by its introducing sentence and its title, not by its line range, so a repin that moves the ranges still works.

Checked: mkdocs build --strict against GitHub, codespell, the generator giving the same page from this branch's previous state and on a second run, a repin test with every source file shifted by one line (all ranges and links move by one), no literal fences in the built page, and Chromium at 390 px light and 1440 px dark without page overflow or JavaScript errors.
@fjp fjp changed the title Low-Level Base Controller: render the include block correctly Low-Level Base Controller: include blocks as firmware excerpts Oct 30, 2026
@fjp
fjp merged commit 2022512 into main Oct 30, 2026
4 checks passed
@fjp
fjp deleted the docs/low-level-code-block branch October 30, 2026 18:00
@github-project-automation github-project-automation Bot moved this from In review to Done in DiffBot & Remo roadmap Oct 30, 2026
fjp added a commit that referenced this pull request Oct 30, 2026
main rewrote the Low-Level Base Controller page with pinned firmware excerpts (#64, #70). This merge takes main's version of the page. The command timeout's changes follow in the next commit, on top of those excerpts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant