Merge branch 'dev' of https://github.com/MilosKozak/AndroidAPS into sv
This commit is contained in:
commit
26fbd450b0
3 changed files with 22 additions and 5 deletions
|
@ -16,6 +16,10 @@ public class IobTotal {
|
|||
public double netbasalinsulin;
|
||||
public double hightempinsulin;
|
||||
|
||||
// oref1
|
||||
public double microBolusInsulin;
|
||||
public double microBolusIOB;
|
||||
|
||||
public double netInsulin = 0d; // for calculations from temp basals only
|
||||
public double netRatio = 0d; // net ratio at start of temp basal
|
||||
|
||||
|
@ -30,6 +34,8 @@ public class IobTotal {
|
|||
this.basaliob = 0d;
|
||||
this.netbasalinsulin = 0d;
|
||||
this.hightempinsulin = 0d;
|
||||
this.microBolusInsulin = 0d;
|
||||
this.microBolusIOB = 0d;
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
|
@ -42,6 +48,8 @@ public class IobTotal {
|
|||
hightempinsulin += other.hightempinsulin;
|
||||
netInsulin += other.netInsulin;
|
||||
extendedBolusInsulin += other.extendedBolusInsulin;
|
||||
microBolusInsulin += other.microBolusInsulin;
|
||||
microBolusIOB += other.microBolusIOB;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -53,6 +61,8 @@ public class IobTotal {
|
|||
result.basaliob = basalIob.basaliob;
|
||||
result.netbasalinsulin = basalIob.netbasalinsulin;
|
||||
result.hightempinsulin = basalIob.hightempinsulin;
|
||||
result.microBolusInsulin = bolusIOB.microBolusInsulin + basalIob.microBolusInsulin;
|
||||
result.microBolusIOB = bolusIOB.microBolusIOB + basalIob.microBolusIOB;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -63,6 +73,8 @@ public class IobTotal {
|
|||
this.basaliob = Round.roundTo(this.basaliob, 0.001);
|
||||
this.netbasalinsulin = Round.roundTo(this.netbasalinsulin, 0.001);
|
||||
this.hightempinsulin = Round.roundTo(this.hightempinsulin, 0.001);
|
||||
this.microBolusInsulin = Round.roundTo(this.microBolusInsulin, 0.001);
|
||||
this.microBolusIOB = Round.roundTo(this.microBolusIOB, 0.001);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -183,8 +183,13 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface {
|
|||
Iob tIOB = t.iobCalc(time, dia);
|
||||
total.iob += tIOB.iobContrib;
|
||||
total.activity += tIOB.activityContrib;
|
||||
Iob bIOB = t.iobCalc(time, dia / SP.getDouble("openapsama_bolussnooze_dia_divisor", 2.0));
|
||||
total.bolussnooze += bIOB.iobContrib;
|
||||
if (!t.isSMB) {
|
||||
Iob bIOB = t.iobCalc(time, dia / SP.getDouble("openapsama_bolussnooze_dia_divisor", 2.0));
|
||||
total.bolussnooze += bIOB.iobContrib;
|
||||
} else {
|
||||
total.basaliob += t.insulin;
|
||||
total.microBolusIOB += tIOB.iobContrib;
|
||||
}
|
||||
}
|
||||
|
||||
if (!MainApp.getConfigBuilder().isFakingTempsByExtendedBoluses())
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<string name="careportal_newnstreatment_sensor">Sensor</string>
|
||||
<string name="configbuilder_profile">Profil</string>
|
||||
<string name="configbuilder_pump">Pumpe</string>
|
||||
<string name="confirmation">Konfiguration</string>
|
||||
<string name="confirmation">Bestätigung</string>
|
||||
<string name="days">Tage</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="openapsma_profile_label">Profil</string>
|
||||
|
@ -109,8 +109,8 @@
|
|||
<string name="treatments_newtreatment_carbsamount_label">Kohlehydrat Menge</string>
|
||||
<string name="treatments_newtreatment_insulinamount_label">Insulin Menge</string>
|
||||
<string name="treatments">Treatments</string>
|
||||
<string name="treatmentssafety_maxbolus_title">Max erlaubter Bolus</string>
|
||||
<string name="treatmentssafety_maxcarbs_title">Max erlaubte Kohlehydrate</string>
|
||||
<string name="treatmentssafety_maxbolus_title">Max erlaubter Bolus [U]</string>
|
||||
<string name="treatmentssafety_maxcarbs_title">Max erlaubte Kohlehydrate [g]</string>
|
||||
<string name="treatmentssafety_title">Tratments Sicherheit</string>
|
||||
<string name="simpleprofile">Einfaches Profil</string>
|
||||
<string name="setextendedbolusquestion">Setze neuen extended Bolus:</string>
|
||||
|
|
Loading…
Reference in a new issue