report autosens to NS

This commit is contained in:
Milos Kozak 2017-05-01 14:28:45 +02:00
parent 34f83e6b09
commit 1b69771893

View file

@ -292,6 +292,8 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
rT.COB=meal_data.mealCOB;
rT.IOB=iob_data.iob;
rT.reason="COB: " + meal_data.mealCOB + ", Dev: " + deviation + ", BGI: " + bgi + ", ISF: " + convert_bg(sens, profile) + ", Target: " + convert_bg(target_bg, profile) + "; ";
if (typeof autosens_data !== 'undefined' && profile.autosens_adjust_targets && autosens_data.ratio != 1)
rT.reason += "Autosens: " + autosens_data.ratio + "; ";
if (bg < threshold) { // low glucose suspend mode: BG is < ~80
rT.reason += "BG " + convert_bg(bg, profile) + "<" + convert_bg(threshold, profile);
if ((glucose_status.delta <= 0 && minDelta <= 0) || (glucose_status.delta < expectedDelta && minDelta < expectedDelta) || bg < 60 ) {