Skip to content

Report the paired sensor's model and send status updates - #24

Merged
ps2 merged 1 commit into
mainfrom
fix/device-model
Oct 14, 2026
Merged

ps2 merged 1 commit into
mainfrom
fix/device-model

Conversation

@ps2

@ps2 ps2 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor
  • HKDevice.model was always "Libre 3", so Libre 3 Plus sensors were mislabeled. It now uses state.sensorModel, which comes from the NFC patch info at pairing. The name follows it ("FreeStyle Libre 3 Plus"). The model is nil before a sensor is paired.
  • setState now also calls cgmManager(_:didUpdate:) on the delegate. Status changes previously only went to status observers (the HUD), so Loop's view of the status, including hasValidSensorSession and the device model, was only refreshed at setup and launch. G7SensorKit sends this status update on every state change too.

Needed for the "CGM Model" analytics property in LoopKit/Loop#2582.

Tested: simulator build of the LoopWorkspace scheme. Not tested with a sensor.

The device model was always "Libre 3", so Libre 3 Plus sensors were
mislabeled. It now uses the sensor model captured at pairing.

Status updates were only sent to status observers, so Loop never heard
about status changes after setup. setState now also sends the current
status to the delegate.
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