-
Notifications
You must be signed in to change notification settings - Fork 395
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
2 new variables #1465
base: dev
Are you sure you want to change the base?
2 new variables #1465
Conversation
Introduces 2 new variables.
Thanks for updating it to remove the new preferences from displayedDefaults vs. #1463: that simplifies things. I don't have any objections to allowing people with familiarity with the code to override these two settings in this way. The code for how these are implemented (such as the Min/Max 0.1 to 1 for smb_delivery_ratio and only being able to increase the Minimum Glucose Threshold, not decrease it) both look like sensible safety guardrails to me. Does anyone want to do on-rig testing before merging this to dev? If not, I'm happy to merge it to dev and test it there, as it looks quite straightfoward. |
I would prefer an off-body rig tester with this to ensure no edge cases pop up before this goes into dev. (Please feel free to step up and volunteer to check this, otherwise it'll go on my/our list to check but it's a long list so if another volunteer has time/attention that will speed this up) |
var threshold = min_bg - 0.5*(min_bg-40); | ||
|
||
// But if profile.threshold_setting is over 65 increase the very minimum glucose threshold | ||
var minimum_threshold = 65; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be 60? I think the lowest you can set min_bg
to is 80
, and 80 - 0.5*(80-40) = 60
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to 60 now
lib/profile/index.js
Outdated
@@ -75,6 +75,8 @@ function defaults ( ) { | |||
, target_bg: false // set to an integer value in mg/dL to override pump min_bg | |||
, edison_battery_shutdown_voltage: 3050 | |||
, pi_battery_shutdown_percent: 2 | |||
, threshold_setting: 65 // The minimum glucose threshold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
60 here too? (see my other comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to 60 now
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), as the 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.
Updated the PR with removal of the variables from allDefaults.