Skip to content

BLE (W6): record IMU in 5/MG Raw Data Collector sessions - #27

Merged
ayiskakov merged 2 commits into
review/phase-1from
review/w06-fixes
Sep 25, 2026
Merged

ayiskakov merged 2 commits into
review/phase-1from
review/w06-fixes

Conversation

@ayiskakov

Copy link
Copy Markdown
Owner

W6 BLE and collection, first Phase 1 batch: the one S2. Stacked on review/phase-1. Finding row: W06-002 in docs/review/workstreams/W06-ble-collect.md.

W06-002 — 5/MG Raw Data Collector sessions recorded no IMU data

A Raw Data Collector session (Test Centre) starts the strap's 100 Hz IMU stream, but the only writer to the session store, ImuSessionFileStore.append, sat in Collector.ingest(frame:parsed:), which nothing in the app calls: ryanbr#1709 moved IMU storage behind that seam, and the 5/MG frame loop never enters it. Upstream has the same gap.

The 5/MG frame loop now hands every frame to Collector.bankImuForSessions before the offload branch, so a session takes buffers from the live stream and from history sync, as ryanbr#1709 intended. Only intact 1244-byte buffers are banked, because Whoop5RawImu decodes without checking the CRC.

Verification

  • CollectorImuBankingTests: an intact real buffer is banked, a CRC-flipped copy is not.
  • StrandTests (1,966) and both app builds pass (NOOPiOS without the watch app).
  • Not yet tested on hardware. The agreed strap run covers it: start a short Raw Data Collector session on the iPhone; the session card should show covered seconds and the export should contain .imus segments. Attach the strap log.

W06-002. A Raw Data Collector session on a WHOOP 5/MG never recorded an
IMU sample. The only writer, ImuSessionFileStore.append, sits in
Collector.ingest(frame:parsed:), and nothing in the app calls that:
ryanbr#1709 moved IMU storage behind the ingest seam, which the 5/MG frame
loop does not enter. The session started the strap's 100 Hz stream,
then exported nothing.

The 5/MG loop now hands every frame to Collector.bankImuForSessions
before the offload branch, so a session takes buffers from the live
stream and from history sync, as ryanbr#1709 intended. Only intact 1244-byte
buffers are banked, because Whoop5RawImu decodes without checking the
CRC.

V1: CollectorImuBankingTests (an intact real buffer is banked, a
CRC-flipped copy is not); Strand and NOOPiOS (without the watch app)
build. Not yet tested on hardware.
@ayiskakov
ayiskakov merged commit 9d7d8ff into review/phase-1 Sep 25, 2026
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