Skip to content

Round to supported rate before setting temp basal rate #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025

Conversation

MikePlante1
Copy link

This PR mirrors LoopKit#16

The issue this addresses would not be noticed with Loop, as Loop rounds before attempting to enact a temporary basal rate. This issue became apparent when using Trio, though, since Trio does not round before attempting to enact a temporary basal rate, leaving the task of rounding up to the pump's submodule. OmniBLE and OmniKit both already internally handle this rounding task, so this PR aims to add it to MinimedKit as well.

I added this commit to my in-vitro build of Trio-dev.

I added a debugging log message in Trio whenever it attempts to enact a temp basal rate that is unsupported by the pump. Before when this was triggered, I would check Trio's History and see two temp basal records for the same time and one of them would be for the unsupported rate. Here's an example of that:

Since adding this commit to my in-vitro Trio build, however, I have had a couple log messages for attempts to enact an unsupported basal rate, but Trio's History only shows the single rounded and supported temp basal rate. Given this, I think this commit solves this issue.

Copy link

@marionbarker marionbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on code review and testing found in LoopKit PR 16, I approve this PR.

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.

2 participants