trend in wizard off by default

This commit is contained in:
Milos Kozak 2017-04-24 19:24:53 +02:00
parent 935a9366d9
commit 7534f54f19
3 changed files with 4 additions and 4 deletions

View file

@ -477,7 +477,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
quickWizardButton.setVisibility(View.VISIBLE);
String text = MainApp.sResources.getString(R.string.bolus) + ": " + quickWizardEntry.buttonText();
BolusWizard wizard = new BolusWizard();
wizard.doCalc(profile.getDefaultProfile(), quickWizardEntry.carbs(), 0d, actualBg.valueToUnits(profile.getUnits()), 0d, true, true, false, true);
wizard.doCalc(profile.getDefaultProfile(), quickWizardEntry.carbs(), 0d, actualBg.valueToUnits(profile.getUnits()), 0d, true, true, false, false);
final JSONObject boluscalcJSON = new JSONObject();
try {
@ -853,7 +853,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
quickWizardButton.setVisibility(View.VISIBLE);
String text = MainApp.sResources.getString(R.string.bolus) + ": " + quickWizardEntry.buttonText() + " " + DecimalFormatter.to0Decimal(quickWizardEntry.carbs()) + "g";
BolusWizard wizard = new BolusWizard();
wizard.doCalc(profile.getDefaultProfile(), quickWizardEntry.carbs(), 0d, lastBG.valueToUnits(profile.getUnits()), 0d, true, true, false, true);
wizard.doCalc(profile.getDefaultProfile(), quickWizardEntry.carbs(), 0d, lastBG.valueToUnits(profile.getUnits()), 0d, true, true, false, false);
text += " " + DecimalFormatter.to2Decimal(wizard.calculatedTotalInsulin) + "U";
quickWizardButton.setText(text);
if (wizard.calculatedTotalInsulin <= 0)

View file

@ -76,7 +76,7 @@ public class BolusWizard {
// Insulin from 15 min trend
glucoseStatus = GlucoseStatus.getGlucoseStatusData();
if (glucoseStatus != null) {
if (glucoseStatus != null && trend) {
insulinFromTrend = (NSProfile.fromMgdlToUnits(glucoseStatus.short_avgdelta, profile.getUnits()) * 3) / sens;
}

View file

@ -353,7 +353,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:width="32dp"
android:checked="true" />
android:checked="false" />
<TextView
android:layout_width="wrap_content"