Add TargetBG

This commit is contained in:
Tim Gunn 2020-05-21 00:10:51 +12:00
parent 3c2d5ff3d6
commit a20008c0db
No known key found for this signature in database
GPG key ID: C9BC1E9D0D0AED8C
2 changed files with 5 additions and 0 deletions

View file

@ -51,6 +51,9 @@ public class DetermineBasalResultSMB extends APSResult {
} else {
smb = 0d;
}
if (result.has("targetBG")) {
targetBG = result.getDouble("targetBG");
}
if (result.has("deliverAt")) {
String date = result.getString("deliverAt");

View file

@ -62,6 +62,7 @@ public class APSResult {
public boolean hasPredictions = false;
public double smb = 0d; // super micro bolus in units
public long deliverAt = 0;
public double targetBG = 0d;
public Constraint<Double> inputConstraints;
@ -184,6 +185,7 @@ public class APSResult {
newResult.smbConstraint = smbConstraint;
newResult.percent = percent;
newResult.usePercent = usePercent;
newResult.targetBG = targetBG;
}