-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use maxBolus to set automaticDosingIOBLimit (#1871)
* Use maxBolus and ratio to set maxAutoIOB * increase ratioMaxAutoInsulinOnBoardToMaxBolus to 2.0 * remove print statements * restore LoopContants * modify name from maxAutoIOB to automaticDosingIOBLimit * Code cleanup in DoseMath * configure new optional commands with default nil DoseMathTests should work without modification * remove whitespace * Add automaticIOBLimitTests * DoseMathTests: add new args to all automated dosing tests * remove defaults so new parameters are required * Modify method for providing insulinOnBoard in LoopDataManager * AlertManagerTests: add new parameter * match whitespace * `insulinOnBoardValue` -> `insulinOnBoard` for logging purposes * Add test for autobolus clamping * Improve readability of dose clamping logic I unified the check into 1 if-statement, changed the `checkAutomaticDosing` variable name so it was more descriptive, and changed the logic so it's clear that `minCorrectionUnits` is being subtracted from * DoseMathTests: use non-zero value for insulinOnBoard * DoseMathTests: move insulinOnBoard internal to test functions * Move IOB limit handling into recommendedAutomaticDose, and recommendedTempBasal methods * Temp basals limited by iob max * Cleanup * Remove unintentional edit * Fix maxThirtyMinuteRateToKeepIOBBelowLimit calculation * Adjust IOB clamping for temp basals to be relative to scheduled basal --------- Co-authored-by: Anna Quinlan <[email protected]> Co-authored-by: Pete Schwamb <[email protected]>
- Loading branch information
1 parent
f6efd72
commit 911406c
Showing
9 changed files
with
169 additions
and
45 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.