Skip to content

device: drop the READY-mode raw LH2 capture - #177

Open
geonnave wants to merge 8 commits into
DotBots:mainfrom
geonnave:lh2-no-capture-pr
Open

geonnave wants to merge 8 commits into
DotBots:mainfrom
geonnave:lh2-no-capture-pr

Conversation

@geonnave

@geonnave geonnave commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #174 (on #173): this PR's own change is its last three commits.

The bootloader still carries a raw LH2 capture from before the calibrate apps existed: in READY mode, with no app running, the host could ask a robot for one raw sample of LH2 counts and get it back in the event log. Corner and spin calibration now both collect through a calibrate app over the air, so nothing uses that path any more, and the compiled-in lh2_calibration.h it sat next to is unused too. This removes both, from both cores and from the host.

Breaking changes.

  • Wire: the 0xA2 LH2_CAPTURE request is gone and its id is marked reserved (as 0xA1 already is). The net core no longer forwards it, IPC channel 9 is gone, and the bootloader no longer writes 0xCA-tagged capture samples into the event log.
  • Host: request_lh2_capture is removed from every client, as are POST /lh2_capture, PayloadLH2Capture and LH2_CALIB_TAG. PyDotBot's calibration session stops calling them in a companion PR, and the two should be released together.

Flashing. Bootloader and net core together, by cable, with the calibration baked. The NSC table is unchanged, so sandbox apps already built against #174's import library run as they are and need no reflash. A robot whose bootloader still has the capture is unaffected by a new host apart from the capture call no longer existing.

+ - Files
The PRs underneath (#173, #174) +468 -194 24 merge separately; drops out when they land
This PR +6 -155 17

This PR's own files: device/bootloader/Source/main.c (+1 -49), and 16 small files: AGENTS.md, device/bootloader/Source/{ipc.h, lh2_calibration.h, localization.c, localization.h, protocol.h}, device/bootloader/bootloader-app.emProject, device/network_core/Source/{ipc.h, main.c, protocol.h}, swarmit/client/{__init__.py, http.py, local.py}, swarmit/testbed/{controller.py, protocol.py, webserver.py} (+5 -106).

Validation.

Left for the docs sweep before merge: doc/wire-protocol.md (the 0xA2 row and the 0xCA paragraph), doc/swarmit.lua (the raw-capture dissector), and the README link to the deleted header.

@codecov-commenter

codecov-commenter commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.14%. Comparing base (d68840d) to head (7f314a2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #177      +/-   ##
==========================================
+ Coverage   91.04%   91.14%   +0.10%     
==========================================
  Files          27       27              
  Lines        5124     5104      -20     
==========================================
- Hits         4665     4652      -13     
+ Misses        459      452       -7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ation

Breaking: the config page magic moves to SWRP, so every robot reads as
uncalibrated until it is cabled with a page baked by a matching host,
and a push only commits from a host sending the mask encoding. Flash the
bootloader and the net core together.

AI-assisted: Claude Opus 5.5
Points at the unmerged DotBot-libs branch adding drv/lh2_geometry; move
it to the merge commit once that lands. Both bootloaders now link
00drv_lh2_geometry, which the camera point moved into.

AI-assisted: Claude Opus 5.5
…r lines

Adds swarmit_localization_get_lines, which moves the init_rng,
get_position, get_min_tx_interval_us and ipc_isr veneers: every sandbox
app must be rebuilt against this cmse_implib.a and flashed after this
bootloader. The secure stack grows to 2 KiB, since the line solve runs
on it under swarmit_keep_alive.

AI-assisted: Claude Opus 5.5
Breaking: the net core no longer accepts 0xA2 and the bootloader no
longer sends 0xCA-tagged log events. Raw counts reach the host only
through the calibrate apps, which read them over the NSC raw-count call.

AI-assisted: Claude Opus 5.5
Breaking: removes request_lh2_capture from the clients and controller,
POST /lh2_capture, PayloadLH2Capture and LH2_CALIB_TAG. PyDotBot's
corner-calibration collect imports these, so it lands together with the
PyDotBot change that removes collect --device.

AI-assisted: Claude Opus 5.5
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.

2 participants