Skip to content

Add meal-tag support from CMeal segment and multi-segment fetching - #8

Open
javiermarcon wants to merge 5 commits into
emogenet:mainfrom
javiermarcon:accuchek-guide-tags
Open

Add meal-tag support from CMeal segment and multi-segment fetching#8
javiermarcon wants to merge 5 commits into
emogenet:mainfrom
javiermarcon:accuchek-guide-tags

Conversation

@javiermarcon

Copy link
Copy Markdown

Summary

Fetches segments by id (0..ACCUCHEK_SEG_MAX, default 3) and reads glucose only from segId=0.
Extracts meal tags from the CMeal segment (segId=3) using the observed 10‑byte record format.
Avoids false positives by decoupling tag parsing from glucose records and emitting JSON after all segments are processed.

Technical details

CMeal record signature: byte7=0x00, byte8=0x72, tag code in byte9.

Tag mapping:

0x4C → Antes comida
0x50 → Desp. Comida
0x54 → En Ayunas
0x74 → Al acostarse

Notes

“Otro” does not appear in the observed CMeal dumps, so it cannot be inferred from the device data captured so far.
If you want it shortened or more formal, tell me the preferred style.

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