8000 docs(cbio): audit which decode path reads which record word (#207) by shroominic · Pull Request #213 · shroominic/OpenGlucose · GitHub
[go: up one dir, main page]

Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/testing/cbio-gs1-glucose-live.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,26 @@ scale, no unexplained disagreement between the app path and the evidence path.
A physiologically-shaped series is still not a calibrated one — it is one more
reason the `/10` scale is plausible, and nothing more.

### Which path reads which word

Audited end to end on the consolidation tip, so that no surface can quietly keep
reading the empty field:

| Path | Reads | Produces a glucose number |
| --- | --- | --- |
| `parseCbioRawDataFrame` | offset 4 → `rawPayload`; offset 6 → `processed.rawWord` | no — owns the layout only |
| `CbioHistoryArchive` (the app's live decode) | `rawPayload` | yes: `derivedMillimolesPerLitre` and the record's scaled value |
| App reading (`CbioGlucoseSession`) | `record.rawPayload` | yes: `rawValue: record.rawPayload`, `valueMgdl: record.rawPayloadScaled`, `isDisplayProvisional: true` |
| `CbioRawGlucoseRecord.rawProcessed` | offset 6 | **no** — exposed as the firmware's processed word, read by tests only |
| `compareCbioDecode` (the harness path) | both, side by side | no — reporting only |
| `parseCbioGlucoseBatch` (`0A` frame) | the `0A` layout's own packed 10-bit field | that frame only, and it is zero on this sensor |

The provisional marker survives the change: the CBIO reading is built with
`isDisplayProvisional: true`, the surfaces render
`provisionalReadingNoticeForSnapshot` — "Includes provisional readings. Not
validated 593E for body glucose." — `isUnitVerified` stays `false`, and every
artifact and comparison still carries `unitStatus: unverified`.

## Derived values, and why they stay unverified

`CbioRawGlucoseRecord` divides `rawPayload` by 10 and `rawTemperature` by 10 because two
Expand Down
Loading
0