Skip to content

The watch loads G7SensorKit at run time - #110

Open
jeremybarnum wants to merge 2 commits into
LoopKit:next-devfrom
jeremybarnum:sportmode/watch-plugins
Open

jeremybarnum wants to merge 2 commits into
LoopKit:next-devfrom
jeremybarnum:sportmode/watch-plugins

Conversation

@jeremybarnum

@jeremybarnum jeremybarnum commented Nov 3, 2026 •

Copy link
Copy Markdown

For LoopKit/Loop#2655. On the watch the kit is its own plugin: a watch-only Info.plist names G7SensorWatchPlugin and the G7CGMManager identifier, under the keys the phone's plugin uses. G7CGMManager adopts LoopKit's DirectReadCGMManager. Nothing changes for the phone. Needs LoopKit/LoopKit#687.

🤖 Generated with Claude Code

On the watch the kit is its own plugin: a watch-only Info.plist names G7SensorWatchPlugin as its
principal class and G7CGMManager as its CGM manager, under the keys the phone's plugin uses.
G7CGMManager adopts LoopKit's DirectReadCGMManager, and its statusDidChange is that protocol's
notification.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem:
- The G7 told the watch what it needs through a watch-only protocol and its own notification: whether it is searching for its sensor, the note for the user, the sensor's name and its last connection.

Solution:
- The G7 implements the new CGMManager members. ensureConnectionActiveOrPending() is the former recheckAcquisition(), and isSearchingForSensor is unchanged. shortStatusNote is the watch's note, so on the phone it keeps the default: no note.
- The G7 supports status observers, as LibreLoop and the mock CGM do, and tells them only when its status, its search or its note changes. The notification is gone.
- Its status now carries lastCommunicationDate: when it last connected to the sensor.

On the phone: the status kept with each dosing decision now carries that date, and the status screen refreshes when the G7's status changes, about once per reading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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