Skip to content

Commit

Permalink
make carbsReqThreshold configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
scottleibrand committed Aug 14, 2017
1 parent 07f2c88 commit a38c0a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/determine-basal/determine-basal.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
zeroTempEffect = round(zeroTempEffect);
carbsReq = round(carbsReq);
console.error("bgUndershoot:",bgUndershoot,"zeroTempDuration:",zeroTempDuration,"zeroTempEffect:",zeroTempEffect,"carbsReq:",carbsReq);
if ( carbsReq > 0 ) {
if ( carbsReq >= profile.carbsReqThreshold ) {
rT.carbsReq = carbsReq;
rT.reason += carbsReq + " add'l carbs req + " + minutesAboveMinBG + "m zero temp; ";
}
Expand Down
1 change: 1 addition & 0 deletions lib/profile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function defaults ( ) {
, curve: "bilinear"
, useCustomPeakTime: false
, insulinPeakTime: 75
, carbsReqThreshold: 1
};
return profile;
}
Expand Down

0 comments on commit a38c0a4

Please sign in to comment.