diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt index c831c22f6c..ca2679e4aa 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt @@ -81,7 +81,7 @@ class OverviewData @Inject constructor( iobSeries = FixedLineGraphSeries() absIobSeries = FixedLineGraphSeries() iobPredictions1Series = PointsWithLabelGraphSeries() - iobPredictions2Series = PointsWithLabelGraphSeries() + //iobPredictions2Series = PointsWithLabelGraphSeries() minusBgiSeries = FixedLineGraphSeries() minusBgiHistSeries = FixedLineGraphSeries() cobSeries = FixedLineGraphSeries() @@ -265,7 +265,7 @@ class OverviewData @Inject constructor( var iobSeries: FixedLineGraphSeries = FixedLineGraphSeries() var absIobSeries: FixedLineGraphSeries = FixedLineGraphSeries() var iobPredictions1Series: PointsWithLabelGraphSeries = PointsWithLabelGraphSeries() - var iobPredictions2Series: PointsWithLabelGraphSeries = PointsWithLabelGraphSeries() + //var iobPredictions2Series: PointsWithLabelGraphSeries = PointsWithLabelGraphSeries() var maxBGIValue = Double.MIN_VALUE val bgiScale = Scale() @@ -724,6 +724,8 @@ class OverviewData @Inject constructor( maxIobValueFound = max(maxIobValueFound, abs(i.iob)) } iobPredictions1Series = PointsWithLabelGraphSeries(Array(iobPrediction.size) { i -> iobPrediction[i] }) + aapsLogger.debug(LTag.AUTOSENS, "IOB prediction for AS=" + DecimalFormatter.to2Decimal(lastAutosensResult.ratio) + ": " + iobCobCalculator.iobArrayToString(iobPredictionArray)) + /* val iobPrediction2: MutableList = java.util.ArrayList() val iobPredictionArray2 = iobCobCalculator.calculateIobArrayForSMB(AutosensResult(), SMBDefaults.exercise_mode, SMBDefaults.half_basal_exercise_target, isTempTarget) for (i in iobPredictionArray2) { @@ -731,11 +733,11 @@ class OverviewData @Inject constructor( maxIobValueFound = max(maxIobValueFound, abs(i.iob)) } iobPredictions2Series = PointsWithLabelGraphSeries(Array(iobPrediction2.size) { i -> iobPrediction2[i] }) - aapsLogger.debug(LTag.AUTOSENS, "IOB prediction for AS=" + DecimalFormatter.to2Decimal(lastAutosensResult.ratio) + ": " + iobCobCalculator.iobArrayToString(iobPredictionArray)) aapsLogger.debug(LTag.AUTOSENS, "IOB prediction for AS=" + DecimalFormatter.to2Decimal(1.0) + ": " + iobCobCalculator.iobArrayToString(iobPredictionArray2)) + */ } else { iobPredictions1Series = PointsWithLabelGraphSeries() - iobPredictions2Series = PointsWithLabelGraphSeries() + //iobPredictions2Series = PointsWithLabelGraphSeries() } // COB diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt index 924cd778f7..f19129a4cc 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt @@ -394,7 +394,11 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList } else if (dexcomPlugin.isEnabled()) { try { dexcomMediator.findDexcomPackageName()?.let { - startActivity(Intent("com.dexcom.cgm.activities.MeterEntryActivity").setPackage(it)) + startActivity( + Intent("com.dexcom.cgm.activities.MeterEntryActivity") + .setPackage(it) + .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) + ) } ?: ToastUtils.showToastInUiThread(activity, rh.gs(R.string.dexcom_app_not_installed)) } catch (e: ActivityNotFoundException) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt index 4d25275a88..b9cac049b1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt @@ -114,7 +114,7 @@ class GraphData( overviewData.iobScale.multiplier = maxY * scale / overviewData.maxIobValueFound addSeries(overviewData.iobSeries) addSeries(overviewData.iobPredictions1Series) - addSeries(overviewData.iobPredictions2Series) + //addSeries(overviewData.iobPredictions2Series) } // scale in % of vertical size (like 0.3)