Reverted sens logic back to original following feedback from users, with safety constraints included.
This commit is contained in:
parent
304edd87eb
commit
438faad4bb
1 changed files with 4 additions and 4 deletions
|
@ -308,12 +308,12 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
|
|||
|
||||
var TDD = (tdd7 * 0.3) + (tdd_24 * 0.7);
|
||||
|
||||
console.error("Rolling 24 hour TDD = "+tdd_24+"; ");
|
||||
/*console.error("Rolling 24 hour TDD = "+tdd_24+"; ");
|
||||
console.error(" ");
|
||||
console.error("Weighted Average TDD = "+TDD+"; ");
|
||||
console.error(" ");
|
||||
//if (tdd7 > 0){
|
||||
/*if ( tdd_pump > tdd7 && now < 5 || now < 7 && TDD < ( 0.8 * tdd7 ) ){
|
||||
//if (tdd7 > 0){*/
|
||||
if ( tdd_pump > tdd7 && now < 5 || now < 7 && TDD < ( 0.8 * tdd7 ) ){
|
||||
TDD = ( 0.8 * tdd7 );
|
||||
console.log("Excess or too low insulin from pump so TDD set to "+TDD+" based on 75% of TDD7; ");
|
||||
rT.reason += "TDD: " +TDD+ " due to low or high tdd from pump; ";
|
||||
|
@ -334,7 +334,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
|
|||
else {
|
||||
console.log("TDD 7 ="+tdd7+", TDD Pump ="+tdd_pump+" and TDD = "+TDD+";");
|
||||
rT.reason += "TDD: " +TDD+ " based on standard pump 60/tdd7 40 split; ";
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
var variable_sens = (277700 / (TDD * bg));
|
||||
|
|
Loading…
Reference in a new issue