Skip to content

Record G5/G6 states without reliable glucose as sensorIssue events - #224

Merged
ps2 merged 1 commit into
next-devfrom
g6-sensor-issue
Oct 12, 2026
Merged

ps2 merged 1 commit into
next-devfrom
g6-sensor-issue

Conversation

@ps2

@ps2 ps2 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Replaces #223 (@bjorkert), using the sensorIssue event type from LoopKit/LoopKit#637. Merge that first.

  • Records a sensorIssue event when the calibration state changes to one without reliable glucose, under the transmitter ID. error.code is the state name, and isFatal is set for sensor and session failures.
  • The last reported state is kept in TransmitterManagerState. It is cleared by a reliable reading, or when the transmitter's session-start offset changes, so a new session starts over.
  • Each event is dated from the reading.

Tests: SensorIssueTests (3).

Each calibration state is recorded once while it lasts, with its name
as the code and isFatal for sensor and session failures. A reliable
reading or a new session (a new start offset from the transmitter)
clears it. The last state is kept in the manager state, so a relaunch
stays quiet.

Ports #223 to next-dev, keeping the bookkeeping in
the manager instead of a shared LoopKit reporter.

Co-authored-by: Jonas Björkert <jonas@bjorkert.se>
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