DetermineBasalAdapter
This commit is contained in:
parent
8d66d22cf6
commit
63b8bdf212
|
@ -32,7 +32,7 @@ import info.nightscout.androidaps.plugins.aps.loop.ScriptReader;
|
|||
import info.nightscout.androidaps.plugins.aps.openAPSMA.LoggerCallback;
|
||||
import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||
|
@ -43,6 +43,7 @@ public class DetermineBasalAdapterAMAJS {
|
|||
@Inject AAPSLogger aapsLogger;
|
||||
@Inject ConstraintChecker constraintChecker;
|
||||
@Inject SP sp;
|
||||
@Inject ProfileFunction profileFunction;
|
||||
|
||||
private ScriptReader mScriptReader;
|
||||
|
||||
|
@ -222,7 +223,7 @@ public class DetermineBasalAdapterAMAJS {
|
|||
mProfile.put("min_5m_carbimpact", sp.getDouble(R.string.key_openapsama_min_5m_carbimpact, SMBDefaults.min_5m_carbimpact));
|
||||
}
|
||||
|
||||
if (ProfileFunctions.getSystemUnits().equals(Constants.MMOL)) {
|
||||
if (profileFunction.getUnits().equals(Constants.MMOL)) {
|
||||
mProfile.put("out_units", "mmol/L");
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import info.nightscout.androidaps.logging.AAPSLogger;
|
|||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.logging.LTag;
|
||||
import info.nightscout.androidaps.plugins.aps.loop.ScriptReader;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||
import info.nightscout.androidaps.utils.SP;
|
||||
|
@ -37,6 +37,8 @@ public class DetermineBasalAdapterMAJS {
|
|||
|
||||
private HasAndroidInjector injector;
|
||||
@Inject AAPSLogger aapsLogger;
|
||||
@Inject ProfileFunction profileFunction;
|
||||
|
||||
private ScriptReader mScriptReader;
|
||||
private JSONObject mProfile;
|
||||
private JSONObject mGlucoseStatus;
|
||||
|
@ -180,7 +182,7 @@ public class DetermineBasalAdapterMAJS {
|
|||
|
||||
mProfile.put("current_basal", basalRate);
|
||||
|
||||
if (ProfileFunctions.getSystemUnits().equals(Constants.MMOL)) {
|
||||
if (profileFunction.getUnits().equals(Constants.MMOL)) {
|
||||
mProfile.put("out_units", "mmol/L");
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import info.nightscout.androidaps.logging.LTag;
|
|||
import info.nightscout.androidaps.plugins.aps.loop.ScriptReader;
|
||||
import info.nightscout.androidaps.plugins.aps.openAPSMA.LoggerCallback;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||
|
@ -44,6 +44,7 @@ public class DetermineBasalAdapterSMBJS {
|
|||
@Inject AAPSLogger aapsLogger;
|
||||
@Inject ConstraintChecker constraintChecker;
|
||||
@Inject SP sp;
|
||||
@Inject ProfileFunction profileFunction;
|
||||
|
||||
private ScriptReader mScriptReader;
|
||||
private JSONObject mProfile;
|
||||
|
@ -276,7 +277,7 @@ public class DetermineBasalAdapterSMBJS {
|
|||
mProfile.put("temptargetSet", tempTargetSet);
|
||||
mProfile.put("autosens_max", SafeParse.stringToDouble(sp.getString(R.string.key_openapsama_autosens_max, "1.2")));
|
||||
|
||||
if (ProfileFunctions.getSystemUnits().equals(Constants.MMOL)) {
|
||||
if (profileFunction.getUnits().equals(Constants.MMOL)) {
|
||||
mProfile.put("out_units", "mmol/L");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue