Repository navigation
Conversation
checkRileyLinkBattery() was only called from the MySentry status path, so without MySentry the link battery was read only when the RileyLink detail screen was opened and the Home header never showed it. Call it from ensureCurrentPumpData(), as OmniPumpManager already does each cycle. Fixes Artificial-Pancreas/iAPS#263 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ps2
reviewed
Nov 2, 2026
ps2
left a comment
Contributor
There was a problem hiding this comment.
Looks good, and it matches what OmniPumpManager does each cycle. One behavior note for the description: each successful read reaches device(_:didUpdateBattery:), so users without MySentry who have set a RileyLink battery alert level will now get the 'Low RileyLink Battery' alert, repeating hourly. That's presumably intended. Also, Loop builds MinimedKit from next-dev. Could this target dev, or be cherry-picked there after merging to main?
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.
MinimedPumpManager.checkRileyLinkBattery()is only called fromupdatePumpStatus(_ status: MySentryPumpStatusMessageBody, …), so for a pump without MySentry the RileyLink battery level is read only when the RileyLink device screen is opened, and hosts that show the link battery elsewhere never get a value.OmniPumpManager.ensureCurrentPumpData()already calls the equivalent every cycle for Eros / RileyLink keep-alive pods.This calls
checkRileyLinkBattery()fromensureCurrentPumpData()as well, so the level refreshes once per data refresh (~5 min).RileyLinkBluetoothDevice.updateBatteryLevel()is a no-op for a device without the battery characteristic, so devices that do not expose one are unaffected. One extra BLE characteristic read per cycle on the RileyLink link; the pump radio session is untouched.Reported against iAPS (Artificial-Pancreas/iAPS#263), which consumes this framework through a fork that tracks
mainhere; the fork has the same change (Artificial-Pancreas#14).