diff --git a/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.java b/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.java index 10a9487da0..39253e4b34 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.java @@ -9,6 +9,7 @@ import android.preference.PreferenceActivity; import android.preference.PreferenceFragment; import android.preference.PreferenceGroup; import android.preference.PreferenceManager; +import android.preference.PreferenceScreen; import android.text.TextUtils; import info.nightscout.androidaps.Config; @@ -190,6 +191,17 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre addPreferencesFromResourceIfEnabled(StatuslinePlugin.getPlugin(), PluginType.GENERAL); } + if (Config.NSCLIENT) { + PreferenceScreen scrnAdvancedSettings = (PreferenceScreen)findPreference(getString(R.string.key_advancedsettings)); + if (scrnAdvancedSettings != null) { + scrnAdvancedSettings.removePreference(getPreference(getString(R.string.key_statuslights_res_warning))); + scrnAdvancedSettings.removePreference(getPreference(getString(R.string.key_statuslights_res_critical))); + scrnAdvancedSettings.removePreference(getPreference(getString(R.string.key_statuslights_bat_warning))); + scrnAdvancedSettings.removePreference(getPreference(getString(R.string.key_statuslights_bat_critical))); + scrnAdvancedSettings.removePreference(getPreference(getString(R.string.key_show_statuslights))); + } + } + initSummary(getPreferenceScreen()); } diff --git a/app/src/main/java/info/nightscout/androidaps/db/CareportalEvent.java b/app/src/main/java/info/nightscout/androidaps/db/CareportalEvent.java index 60c7553cc3..92a2b221ff 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/CareportalEvent.java +++ b/app/src/main/java/info/nightscout/androidaps/db/CareportalEvent.java @@ -90,8 +90,8 @@ public class CareportalEvent implements DataPointWithLabelInterface, Interval { return System.currentTimeMillis() - date; } - public long getHoursFromStart() { - return (System.currentTimeMillis() - date) / (60 * 60 * 1000); + public double getHoursFromStart() { + return (System.currentTimeMillis() - date) / (60 * 60 * 1000.0); } public String age() { diff --git a/app/src/main/java/info/nightscout/androidaps/interfaces/PumpInterface.java b/app/src/main/java/info/nightscout/androidaps/interfaces/PumpInterface.java index 614c6033d3..976ac5c607 100644 --- a/app/src/main/java/info/nightscout/androidaps/interfaces/PumpInterface.java +++ b/app/src/main/java/info/nightscout/androidaps/interfaces/PumpInterface.java @@ -33,6 +33,10 @@ public interface PumpInterface { double getBaseBasalRate(); // base basal rate, not temp basal + double getReservoirLevel(); + + int getBatteryLevel(); // in percent as integer + PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo); void stopBolusDelivering(); PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes, Profile profile, boolean enforceNew); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java index 0ce86b0080..281a06d472 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java @@ -3,6 +3,7 @@ package info.nightscout.androidaps.plugins.Overview; import android.annotation.SuppressLint; import android.app.Activity; import android.app.NotificationManager; +import android.arch.core.util.Function; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; @@ -97,6 +98,7 @@ import info.nightscout.androidaps.plugins.Loop.LoopPlugin; import info.nightscout.androidaps.plugins.Loop.events.EventNewOpenLoopNotification; import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload; import info.nightscout.androidaps.plugins.NSClientInternal.data.NSDeviceStatus; +import info.nightscout.androidaps.plugins.NSClientInternal.data.NSSettingsStatus; import info.nightscout.androidaps.plugins.Overview.Dialogs.CalibrationDialog; import info.nightscout.androidaps.plugins.Overview.Dialogs.ErrorHelperActivity; import info.nightscout.androidaps.plugins.Overview.Dialogs.NewCarbsDialog; @@ -162,6 +164,13 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, TextView sage; TextView pbage; + TextView iageView; + TextView cageView; + TextView reservoirView; + TextView sageView; + TextView batteryView; + LinearLayout statuslightsLayout; + RecyclerView notificationsView; LinearLayoutManager llm; @@ -258,8 +267,15 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, sage = (TextView) view.findViewById(R.id.careportal_sensorage); pbage = (TextView) view.findViewById(R.id.careportal_pbage); - bgGraph = (GraphView) view.findViewById(R.id.overview_bggraph); - iobGraph = (GraphView) view.findViewById(R.id.overview_iobgraph); + iageView = (TextView) view.findViewById(R.id.overview_insulinage); + cageView = (TextView) view.findViewById(R.id.overview_canulaage); + reservoirView = (TextView) view.findViewById(R.id.overview_reservoirlevel); + sageView = (TextView) view.findViewById(R.id.overview_sensorage); + batteryView = (TextView) view.findViewById(R.id.overview_batterylevel); + statuslightsLayout = (LinearLayout) view.findViewById(R.id.overview_statuslights); + + bgGraph = (GraphView) view.findViewById(R.id.overview_bggraph); + iobGraph = (GraphView) view.findViewById(R.id.overview_iobgraph); treatmentButton = (SingleClickButton) view.findViewById(R.id.overview_treatmentbutton); treatmentButton.setOnClickListener(this); @@ -1105,25 +1121,25 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, final LoopPlugin.LastRun finalLastRun = LoopPlugin.lastRun; if (Config.APS && pump.getPumpDescription().isTempBasalCapable) { apsModeView.setVisibility(View.VISIBLE); - apsModeView.setBackgroundColor(MainApp.gc(R.color.loopenabled)); - apsModeView.setTextColor(Color.BLACK); + apsModeView.setBackgroundColor(MainApp.gc(R.color.ribbonDefault)); + apsModeView.setTextColor(MainApp.gc(R.color.ribbonTextDefault)); final LoopPlugin loopPlugin = LoopPlugin.getPlugin(); if (loopPlugin.isEnabled(PluginType.LOOP) && loopPlugin.isSuperBolus()) { - apsModeView.setBackgroundColor(MainApp.gc(R.color.looppumpsuspended)); + apsModeView.setBackgroundColor(MainApp.gc(R.color.ribbonWarning)); apsModeView.setText(String.format(MainApp.gs(R.string.loopsuperbolusfor), loopPlugin.minutesToEndOfSuspend())); - apsModeView.setTextColor(Color.WHITE); - } else if (loopPlugin.isDisconnected()) { - apsModeView.setBackgroundColor(MainApp.gc(R.color.looppumpsuspended)); + apsModeView.setTextColor(MainApp.gc(R.color.ribbonTextWarning)); + } else if (loopPlugin.isDisconnected()) { + apsModeView.setBackgroundColor(MainApp.gc(R.color.ribbonCritical)); apsModeView.setText(String.format(MainApp.gs(R.string.loopdisconnectedfor), loopPlugin.minutesToEndOfSuspend())); - apsModeView.setTextColor(Color.WHITE); + apsModeView.setTextColor(MainApp.gc(R.color.ribbonTextCritical)); } else if (loopPlugin.isEnabled(PluginType.LOOP) && loopPlugin.isSuspended()) { - apsModeView.setBackgroundColor(MainApp.gc(R.color.looppumpsuspended)); + apsModeView.setBackgroundColor(MainApp.gc(R.color.ribbonWarning)); apsModeView.setText(String.format(MainApp.gs(R.string.loopsuspendedfor), loopPlugin.minutesToEndOfSuspend())); - apsModeView.setTextColor(Color.WHITE); + apsModeView.setTextColor(MainApp.gc(R.color.ribbonTextWarning)); } else if (pump.isSuspended()) { - apsModeView.setBackgroundColor(MainApp.gc(R.color.looppumpsuspended)); + apsModeView.setBackgroundColor(MainApp.gc(R.color.ribbonWarning)); apsModeView.setText(MainApp.gs(R.string.pumpsuspended)); - apsModeView.setTextColor(Color.WHITE); + apsModeView.setTextColor(MainApp.gc(R.color.ribbonTextWarning)); } else if (loopPlugin.isEnabled(PluginType.LOOP)) { if (closedLoopEnabled.value()) { apsModeView.setText(MainApp.gs(R.string.closedloop)); @@ -1131,9 +1147,9 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, apsModeView.setText(MainApp.gs(R.string.openloop)); } } else { - apsModeView.setBackgroundColor(MainApp.gc(R.color.loopdisabled)); + apsModeView.setBackgroundColor(MainApp.gc(R.color.ribbonCritical)); apsModeView.setText(MainApp.gs(R.string.disabledloop)); - apsModeView.setTextColor(Color.WHITE); + apsModeView.setTextColor(MainApp.gc(R.color.ribbonTextCritical)); } } else { apsModeView.setVisibility(View.GONE); @@ -1142,13 +1158,13 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, // temp target TempTarget tempTarget = TreatmentsPlugin.getPlugin().getTempTargetFromHistory(); if (tempTarget != null) { - tempTargetView.setTextColor(Color.BLACK); - tempTargetView.setBackgroundColor(MainApp.gc(R.color.tempTargetBackground)); + tempTargetView.setTextColor(MainApp.gc(R.color.ribbonTextWarning)); + tempTargetView.setBackgroundColor(MainApp.gc(R.color.ribbonWarning)); tempTargetView.setVisibility(View.VISIBLE); tempTargetView.setText(Profile.toTargetRangeString(tempTarget.low, tempTarget.high, Constants.MGDL, units) + " " + DateUtil.untilString(tempTarget.end())); } else { - tempTargetView.setTextColor(Color.WHITE); - tempTargetView.setBackgroundColor(MainApp.gc(R.color.tempTargetDisabledBackground)); + tempTargetView.setTextColor(MainApp.gc(R.color.ribbonTextDefault)); + tempTargetView.setBackgroundColor(MainApp.gc(R.color.ribbonDefault)); tempTargetView.setText(Profile.toTargetRangeString(profile.getTargetLow(), profile.getTargetHigh(), units, units)); tempTargetView.setVisibility(View.VISIBLE); } @@ -1247,7 +1263,13 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, } activeProfileView.setText(ProfileFunctions.getInstance().getProfileName()); - activeProfileView.setBackgroundColor(Color.GRAY); + if (profile.getPercentage() != 100 || profile.getTimeshift() != 0) { + activeProfileView.setBackgroundColor(MainApp.gc(R.color.ribbonWarning)); + activeProfileView.setTextColor(MainApp.gc(R.color.ribbonTextWarning)); + } else { + activeProfileView.setBackgroundColor(MainApp.gc(R.color.ribbonDefault)); + activeProfileView.setTextColor(MainApp.gc(R.color.ribbonTextDefault)); + } // QuickWizard button QuickWizardEntry quickWizardEntry = OverviewPlugin.getPlugin().quickWizard.getActive(); @@ -1352,6 +1374,56 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, cobView.setText(cobText); } + if (statuslightsLayout != null) { + if (SP.getBoolean(R.string.key_show_statuslights, false)) { + CareportalEvent careportalEvent; + NSSettingsStatus nsSettings = new NSSettingsStatus().getInstance(); + double iageUrgent = nsSettings.getExtendedWarnValue("iage", "urgent", 96); + double iageWarn = nsSettings.getExtendedWarnValue("iage", "warn", 72); + double cageUrgent = nsSettings.getExtendedWarnValue("cage", "urgent", 72); + double cageWarn = nsSettings.getExtendedWarnValue("cage", "warn", 48); + double sageUrgent = nsSettings.getExtendedWarnValue("sage", "urgent", 166); + double sageWarn = nsSettings.getExtendedWarnValue("sage", "warn", 164); + //double pbageUrgent = nsSettings.getExtendedWarnValue("pgage", "urgent", 360); + //double pbageWarn = nsSettings.getExtendedWarnValue("pgage", "warn", 240); + double batUrgent = SP.getDouble(R.string.key_statuslights_bat_critical, 5.0); + double batWarn = SP.getDouble(R.string.key_statuslights_bat_warning, 25.0); + double resUrgent = SP.getDouble(R.string.key_statuslights_res_critical, 10.0); + double resWarn = SP.getDouble(R.string.key_statuslights_res_warning, 80.0); + + if (cageView != null) { + careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.SITECHANGE); + double canAge = careportalEvent != null ? careportalEvent.getHoursFromStart() : Double.MAX_VALUE; + applyStatuslight(cageView, "CAN", canAge, cageWarn, cageUrgent, Double.MAX_VALUE, true); + } + + if (iageView != null) { + careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.INSULINCHANGE); + double insulinAge = careportalEvent != null ? careportalEvent.getHoursFromStart() : Double.MAX_VALUE; + applyStatuslight(iageView, "INS", insulinAge, iageWarn, iageUrgent, Double.MAX_VALUE, true); + } + + if (reservoirView != null) { + double reservoirLevel = pump.isInitialized() ? pump.getReservoirLevel() : -1; + applyStatuslight(reservoirView, "RES", reservoirLevel, resWarn, resUrgent, -1, false); + } + + if (sageView != null) { + careportalEvent = MainApp.getDbHelper().getLastCareportalEvent(CareportalEvent.SENSORCHANGE); + double sensorAge = careportalEvent != null ? careportalEvent.getHoursFromStart() : Double.MAX_VALUE; + applyStatuslight(sageView, "SEN", sensorAge, sageWarn, sageUrgent, Double.MAX_VALUE, true); + } + + if (batteryView != null) { + double batteryLevel = pump.isInitialized() ? pump.getBatteryLevel() : -1; + applyStatuslight(batteryView, "BAT", batteryLevel, batWarn, batUrgent, -1, false); + } + statuslightsLayout.setVisibility(View.VISIBLE); + } else { + statuslightsLayout.setVisibility(View.GONE); + } + } + boolean predictionsAvailable; if (Config.APS) predictionsAvailable = finalLastRun != null && finalLastRun.request.hasPredictions; @@ -1542,4 +1614,21 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, } } + public static void applyStatuslight(TextView view, String text, double value, double warnThreshold, double urgentThreshold, double invalid, boolean checkAscending) { + Function check = checkAscending ? (Double threshold) -> value >= threshold : (Double threshold) -> value <= threshold; + if (value != invalid) { + view.setText(text); + if (check.apply(urgentThreshold)) { + view.setTextColor(MainApp.gc(R.color.ribbonCritical)); + } else if (check.apply(warnThreshold)) { + view.setTextColor(MainApp.gc(R.color.ribbonWarning)); + } else { + view.setTextColor(MainApp.gc(R.color.ribbonDefault)); + } + view.setVisibility(View.VISIBLE); + } else { + view.setVisibility(View.GONE); + } + + } } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java index ee7feb5eaf..08e8edfb92 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java @@ -435,6 +435,23 @@ public class ComboPlugin extends PluginBase implements PumpInterface, Constraint return pump.basalProfile.hourlyRates[currentHour]; } + @Override + public double getReservoirLevel() { + return pump.reservoirLevel; + } + + @Override + public int getBatteryLevel() { + switch (pump.state.batteryState) { + case PumpState.EMPTY: + return 5; + case PumpState.LOW: + return 25; + default: + return 100; + } + } + private static BolusProgressReporter bolusProgressReporter = (state, percent, delivered) -> { EventOverviewBolusProgress event = EventOverviewBolusProgress.getInstance(); switch (state) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/AbstractDanaRPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/AbstractDanaRPlugin.java index c50e635eb8..75eb9bdf3c 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/AbstractDanaRPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/AbstractDanaRPlugin.java @@ -152,6 +152,12 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte return DanaRPump.getInstance().currentBasal; } + @Override + public double getReservoirLevel() { return DanaRPump.getInstance().reservoirRemainingUnits; } + + @Override + public int getBatteryLevel() { return DanaRPump.getInstance().batteryRemaining; } + @Override public void stopBolusDelivering() { if (sExecutionService == null) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/DanaRSPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/DanaRSPlugin.java index d6a4dd015b..33422d55f1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/DanaRSPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/DanaRSPlugin.java @@ -373,6 +373,12 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte return DanaRPump.getInstance().currentBasal; } + @Override + public double getReservoirLevel() { return DanaRPump.getInstance().reservoirRemainingUnits; } + + @Override + public int getBatteryLevel() { return DanaRPump.getInstance().batteryRemaining; } + @Override public synchronized PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) { detailedBolusInfo.insulin = MainApp.getConstraintChecker().applyBolusConstraints(new Constraint<>(detailedBolusInfo.insulin)).value(); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/InsightPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/InsightPlugin.java index c72da31fdf..4dcf8a41a5 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/InsightPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/InsightPlugin.java @@ -408,6 +408,12 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai return basalRate; } + @Override + public double getReservoirLevel() { return reservoirInUnits; } + + @Override + public int getBatteryLevel() { return batteryPercent; } + public String getBaseBasalRateString() { final DecimalFormat df = new DecimalFormat("#.##"); return df.format(basalRate); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsightLocal/LocalInsightPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsightLocal/LocalInsightPlugin.java index a928d56504..36eca29d11 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsightLocal/LocalInsightPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsightLocal/LocalInsightPlugin.java @@ -495,6 +495,18 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con else return 0; } + @Override + public double getReservoirLevel() { + if (cartridgeStatus == null) return 0; + return cartridgeStatus.getRemainingAmount(); + } + + @Override + public int getBatteryLevel() { + if (batteryStatus == null) return 0; + return batteryStatus.getBatteryAmount(); + } + @Override public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) { PumpEnactResult result = new PumpEnactResult(); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpMDI/MDIPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpMDI/MDIPlugin.java index 7caca31891..d07c7fc019 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpMDI/MDIPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpMDI/MDIPlugin.java @@ -136,6 +136,12 @@ public class MDIPlugin extends PluginBase implements PumpInterface { return 0d; } + @Override + public double getReservoirLevel() { return -1; } + + @Override + public int getBatteryLevel() { return -1; } + @Override public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) { PumpEnactResult result = new PumpEnactResult(); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java index 3207791b88..4fb7bb6f9d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java @@ -225,6 +225,12 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface { } + @Override + public double getReservoirLevel() { return reservoirInUnits; } + + @Override + public int getBatteryLevel() { return batteryPercent; } + @Override public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) { diff --git a/app/src/main/res/layout/overview_fragment.xml b/app/src/main/res/layout/overview_fragment.xml index b27f97b6cd..18967ec6e0 100644 --- a/app/src/main/res/layout/overview_fragment.xml +++ b/app/src/main/res/layout/overview_fragment.xml @@ -183,6 +183,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + #de7550 #25912e - #47c8ff - #FFDD7792 - #ff0400 - #FF8C00 #ff0400 #ff5e55 @@ -76,5 +72,12 @@ #72FF0000 #72000000 + #5a595b + #f4d700 + #ff0400 + #FFFFFF + #303030 + #FFFFFF + #424242 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9ac48db0c1..24139fd979 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -479,6 +479,7 @@ Always use short average delta instead of simple delta Useful when data from unfiltered sources like xDrip gets noisy. Advanced Settings + key_advancedsettings Model: %1$02X Protocol: %2$02X Code: %3$02X Profile Default value: 3 This is a key OpenAPS safety cap. What this does is limit your basals to be 3x (in this people) your biggest basal rate. You likely will not need to change this, but you should be aware that’s what is discussed about “3x max daily; 4x current” for safety caps. @@ -605,6 +606,17 @@ key_usersuperbolus Enable superbolus in wizard Enable superbolus functionality in wizard. Do not enable until you learn what it really does. IT MAY CAUSE INSULIN OVERDOSE IF USED BLINDLY! + key_show_statuslights + Show status lights on home screen + Enable status lights for cage, iage, sage, reservoir and battery level on home screen. + key_statuslights_res_warning + Threshold warning reservoir level [U] + key_statuslights_res_critical + Threshold critical reservoir level [U] + key_statuslights_bat_warning + Threshold warning battery level [%] + key_statuslights_bat_critical + Threshold critical battery level [%] IOB COB Firmware diff --git a/app/src/main/res/xml/pref_overview.xml b/app/src/main/res/xml/pref_overview.xml index 5ea72547b7..0550143010 100644 --- a/app/src/main/res/xml/pref_overview.xml +++ b/app/src/main/res/xml/pref_overview.xml @@ -141,7 +141,7 @@ - + + + + + + + + + + + diff --git a/app/src/test/java/info/nightscout/MainAppTest.java b/app/src/test/java/info/nightscout/MainAppTest.java index 1bbfba3662..effe8c5384 100644 --- a/app/src/test/java/info/nightscout/MainAppTest.java +++ b/app/src/test/java/info/nightscout/MainAppTest.java @@ -72,7 +72,7 @@ public class MainAppTest { if (Config.NSCLIENT) expected = 1; // VirtualPump only else - expected = 7; + expected = 8; Assert.assertEquals(expected, mainApp.getSpecificPluginsList(PluginType.PUMP).size()); } @@ -83,7 +83,7 @@ public class MainAppTest { if (Config.NSCLIENT) expected = 1; // VirtualPump only else - expected = 7; + expected = 8; Assert.assertEquals(expected, mainApp.getSpecificPluginsVisibleInList(PluginType.PUMP).size()); } @@ -94,7 +94,7 @@ public class MainAppTest { if (Config.NSCLIENT) expected = 1; // VirtualPump only else - expected = 7; + expected = 8; Assert.assertEquals(expected, mainApp.getSpecificPluginsListByInterface(PumpInterface.class).size()); } @@ -105,7 +105,7 @@ public class MainAppTest { if (Config.NSCLIENT) expected = 1; // VirtualPump only else - expected = 7; + expected = 8; Assert.assertEquals(expected, mainApp.getSpecificPluginsVisibleInListByInterface(PumpInterface.class, PluginType.PUMP).size()); }