Add meal-tag support from CMeal segment and multi-segment fetching - #8
Open
javiermarcon wants to merge 5 commits into
Open
Add meal-tag support from CMeal segment and multi-segment fetching#8javiermarcon wants to merge 5 commits into
javiermarcon wants to merge 5 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.