Merge pull request #1914 from tim2000s/dev

Fix cut and paste error on future sens.
This commit is contained in:
Milos Kozak 2022-07-16 11:17:25 +02:00 committed by GitHub
commit e3339d8a5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -838,7 +838,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
rT.reason += "Dosing sensitivity: " +future_sens+" using eventual BG;";
}
else if( glucose_status.delta > 0 && eventualBG > target_bg || eventualBG > bg && bg < 198 ) {
else if( glucose_status.delta > 0 && eventualBG > target_bg || eventualBG > bg ) {
var future_sens = ( 1800 / (Math.log((bg/ins_val)+1)*TDD));
//var future_sens_old = ( 277700 / (TDD * bg));
console.log("Future state sensitivity is " +future_sens+" using current bg due to small delta or variation");
@ -1318,4 +1318,4 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
};
module.exports = determine_basal;
module.exports = determine_basal;