openaps / oref0

oref0: The open reference implementation of the OpenAPS reference design.
http://www.OpenAPS.org
MIT License
430 stars 396 forks source link

2 new variables #1463

Closed Jon-b-m closed 5 months ago

Jon-b-m commented 5 months ago

This PR has 2 objectives.

1: introduce 2 new variables.

2: This will make the Oref0 modules identical to the Oref0 code used in newest version of iAPS (v 4.0.0).Newest iAPS version 4 will be using clean Oref0 code. Currently only difference is these 2 variables, in lib/determine_basal.js and lib/profile/index.js).

Variable 1: SMB Delivery Ratio. Introduces a variable for the SMB Delivery Ratio, default is 0.5 (50 % of insulinReq) as before. Min/Max 0.1 to 1.

This has been a setting in iAPS for a long time and allows for adjustment by users of how rapid/slow the insulinReq is delivered. I use it mostly just in an iAPS middleware function, increasing the ratio slightly when glucose is quickly rising and/or decreasing when glucose is falling.

Variable 2: Minimum Glucose Threshold. This variable allows to increase the very minimum glucose threshold of 65 mg/dl.

Some iAPS users think the the 65 mg/dl sometime is too low. This will allow users to increase this value. Default is 65, as before.