You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 <anna.quinlan123@gmail.com>
Co-authored-by: Pete Schwamb <pete@schwamb.net>
// For 0 <= time <= effectDelay, assume a small amount effected. This will result in large (negative) unit recommendation rather than no recommendation at all.
0 commit comments