Round to supported rate before setting temp basal rate#16
Conversation
StatusChanges look good. Code ReviewThe code changes look appropriate and necessary for an app that relies on the pump manager to manage allowed pump basal rates. Test
Loop testsLoop will not call with a rate that is not "allowed". So this test is to just ensure Loop continues to work as expected with the modification. Configuration
Test Scenario
Loop continues to work as expected. (maxBasal setting in therapy is 6 U/hr) Trio testsI did not reproduce the error or resolution for Trio because @MikePlante1 already did that in the previous comment. |
marionbarker
left a comment
There was a problem hiding this comment.
Approving from code review and test.
ps2
left a comment
There was a problem hiding this comment.
The responsibility should be for the caller to send the right rates.
- For automated dosing, it is important that the algo is making the right decision for rounding (up or down).
- For manual dosing, it's important that the user know what rate they are setting.
|
This PR allows Trio to find out the supported rates for the pump. It has been used successfully with Trio using the loopandlearn I tested again. There is no harm to LoopWorkspace to add this function. It parallels the same function found in OmniBLE, OmniKit and DanaKit. This is one step towards bringing the MinimedKit code into alignment between Trio and Loop. |
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.