Skip to content

Commit

Permalink
Revert "truncate all BG predictions at 3.5 hours"
Browse files Browse the repository at this point in the history
This reverts commit 1bd44a6.
  • Loading branch information
scottleibrand committed Sep 24, 2017
1 parent 5c98670 commit eb6de8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/determine-basal/determine-basal.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,11 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
}
UAMpredBG = UAMpredBGs[UAMpredBGs.length-1] + predBGI + Math.min(0, predDev) + predUCI;
//console.error(predBGI, predCI, predUCI);
// truncate all BG predictions at 3.5 hours
if ( IOBpredBGs.length < 42) { IOBpredBGs.push(IOBpredBG); }
if ( COBpredBGs.length < 42) { COBpredBGs.push(COBpredBG); }
if ( aCOBpredBGs.length < 42) { aCOBpredBGs.push(aCOBpredBG); }
if ( UAMpredBGs.length < 42) { UAMpredBGs.push(UAMpredBG); }
// truncate all BG predictions at 4 hours
if ( IOBpredBGs.length < 48) { IOBpredBGs.push(IOBpredBG); }
if ( COBpredBGs.length < 48) { COBpredBGs.push(COBpredBG); }
if ( aCOBpredBGs.length < 48) { aCOBpredBGs.push(aCOBpredBG); }
if ( UAMpredBGs.length < 48) { UAMpredBGs.push(UAMpredBG); }
// calculate minGuardBG without a wait from COB if available, or UAM, or IOB predBGs
if ( (cid || remainingCIpeak > 0) && fractionCOBAbsorbed < 0.75 ) {
if ( COBpredBG < minGuardBG ) { minGuardBG = round(COBpredBG); }
Expand Down

0 comments on commit eb6de8e

Please sign in to comment.