From e59e66e6bd7616861e5f013542e4c72b9fd9fda8 Mon Sep 17 00:00:00 2001 From: Andries Smit Date: Tue, 15 Feb 2022 14:16:51 +0100 Subject: [PATCH 1/2] feat: show hide battery status light --- .../plugins/general/actions/ActionsFragment.kt | 11 +++++++---- .../plugins/general/overview/OverviewFragment.kt | 15 ++++++++++++++- .../main/res/layout/careportal_stats_fragment.xml | 4 +--- .../layout/careportal_stats_fragment_lowres.xml | 4 +--- .../res/layout/overview_statuslights_layout.xml | 1 + 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt index 54c21c929e..bebdc7531c 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt @@ -8,6 +8,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.LinearLayout +import android.widget.TableRow import android.widget.TextView import androidx.core.content.ContextCompat import dagger.android.support.DaggerFragment @@ -108,6 +109,7 @@ class ActionsFragment : DaggerFragment() { private var insulinLevelLabel: TextView? = null private var pbLevelLabel: TextView? = null private var cannulaOrPatch: TextView? = null + private var batteryLayout: TableRow? = null override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, @@ -143,7 +145,6 @@ class ActionsFragment : DaggerFragment() { historyBrowser = view.findViewById(R.id.actions_historybrowser) tddStats = view.findViewById(R.id.actions_tddstats) pumpBatteryChange = view.findViewById(R.id.actions_pumpbatterychange) - cannulaAge = view.findViewById(R.id.cannula_age) insulinAge = view.findViewById(R.id.insulin_age) reservoirLevel = view.findViewById(R.id.reservoir_level) @@ -155,6 +156,7 @@ class ActionsFragment : DaggerFragment() { insulinLevelLabel = view.findViewById(R.id.insulin_level_label) pbLevelLabel = view.findViewById(R.id.pb_level_label) cannulaOrPatch = view.findViewById(R.id.cannula_or_patch) + batteryLayout = view.findViewById(R.id.battery_layout) profileSwitch?.setOnClickListener { activity?.let { activity -> @@ -335,10 +337,11 @@ class ActionsFragment : DaggerFragment() { } tempTarget?.visibility = (profile != null && !loop.isDisconnected).toVisibility() tddStats?.visibility = pump.pumpDescription.supportsTDDs.toVisibility() - - cannulaOrPatch?.text = if (pump.pumpDescription.isPatchPump) rh.gs(R.string.patch_pump) else rh.gs(R.string.cannula) - val imageResource = if (pump.pumpDescription.isPatchPump) R.drawable.ic_patch_pump_outline else R.drawable.ic_cp_age_cannula + val isPatchPump = pump.pumpDescription.isPatchPump + cannulaOrPatch?.text = if (isPatchPump) rh.gs(R.string.patch_pump) else rh.gs(R.string.cannula) + val imageResource = if (isPatchPump) R.drawable.ic_patch_pump_outline else R.drawable.ic_cp_age_cannula cannulaOrPatch?.setCompoundDrawablesWithIntrinsicBounds(imageResource, 0, 0, 0) + batteryLayout?.visibility = (!isPatchPump || pump is OmnipodErosPumpPlugin).toVisibility() if (!config.NSCLIENT) { statusLightHandler.updateStatusLights(cannulaAge, insulinAge, reservoirLevel, sensorAge, sensorLevel, pbAge, batteryLevel) 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 a3b4f11b15..cbca2846c9 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 @@ -34,6 +34,7 @@ import info.nightscout.androidaps.database.entities.UserEntry.Action import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.database.interfaces.end import info.nightscout.androidaps.databinding.OverviewFragmentBinding +import info.nightscout.androidaps.diaconn.DiaconnG8Plugin import info.nightscout.androidaps.dialogs.* import info.nightscout.androidaps.events.EventAcceptOpenLoopChange import info.nightscout.androidaps.events.EventInitializationChanged @@ -61,6 +62,7 @@ import info.nightscout.androidaps.plugins.general.overview.notifications.Notific import info.nightscout.androidaps.plugins.general.wear.events.EventWearInitiateAction import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.plugins.pump.common.defs.PumpType +import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugin import info.nightscout.androidaps.plugins.source.DexcomPlugin import info.nightscout.androidaps.plugins.source.XdripPlugin import info.nightscout.androidaps.skins.SkinProvider @@ -866,13 +868,24 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList fun updateTime(from: String) { binding.infoLayout.time.text = dateUtil.timeString(dateUtil.now()) // Status lights - val isPatchPump = activePlugin.activePump.pumpDescription.isPatchPump + val pump = activePlugin.activePump + val isPatchPump = pump.pumpDescription.isPatchPump binding.statusLightsLayout.apply { cannulaOrPatch.setImageResource(if (isPatchPump) R.drawable.ic_patch_pump_outline else R.drawable.ic_cp_age_cannula) cannulaOrPatch.contentDescription = rh.gs(if (isPatchPump) R.string.statuslights_patch_pump_age else R.string.statuslights_cannula_age) cannulaOrPatch.scaleX = if (isPatchPump) 1.4f else 2f cannulaOrPatch.scaleY = cannulaOrPatch.scaleX insulinAge.visibility = isPatchPump.not().toVisibility() + // Patch pumps discards batteries and do not need to shown the status battery light excepts for Omnipod Eros + batteryLayout.visibility = (!isPatchPump || pump is OmnipodErosPumpPlugin).toVisibility() + // Only show battery level if the action button change battery is available + val useBatteryAge = (pump is DiaconnG8Plugin && pump.pumpDescription.isBatteryReplaceable && !pump.isBatteryChangeLoggingEnabled()) + || (pump.pumpDescription.isBatteryReplaceable || (pump is OmnipodErosPumpPlugin && pump.isUseRileyLinkBatteryLevel && pump.isBatteryChangeLoggingEnabled)) + pbAge.visibility = useBatteryAge.toVisibility() + // Only show battery level when supported by pump or link + val useBatteryLevel = (pump.model() == PumpType.OMNIPOD_EROS && pump is OmnipodErosPumpPlugin) + || (pump.model() != PumpType.ACCU_CHEK_COMBO && pump.model() != PumpType.OMNIPOD_DASH) + batteryLevel.visibility = useBatteryLevel.toVisibility() statusLights.visibility = (sp.getBoolean(R.string.key_show_statuslights, true) || config.NSCLIENT).toVisibility() } statusLightHandler.updateStatusLights( diff --git a/app/src/main/res/layout/careportal_stats_fragment.xml b/app/src/main/res/layout/careportal_stats_fragment.xml index c2281c139c..5763e51ad0 100644 --- a/app/src/main/res/layout/careportal_stats_fragment.xml +++ b/app/src/main/res/layout/careportal_stats_fragment.xml @@ -41,7 +41,6 @@ android:textColor="@android:color/white" android:textSize="14sp" /> - - @@ -246,7 +245,6 @@ android:textSize="14sp" app:drawableStartCompat="@drawable/ic_cp_age_battery" /> - - - @@ -189,7 +188,6 @@ android:textSize="14sp" app:drawableStartCompat="@drawable/ic_cp_age_battery" /> - Date: Mon, 7 Mar 2022 20:17:21 +0100 Subject: [PATCH 2/2] chore: add battery feature to pump description --- .../general/actions/ActionsFragment.kt | 11 +- .../general/overview/OverviewFragment.kt | 9 +- .../general/overview/StatusLightHandler.kt | 30 +-- .../res/layout/careportal_stats_fragment.xml | 16 -- .../careportal_stats_fragment_lowres.xml | 230 ------------------ .../nightscout/androidaps/interfaces/Pump.kt | 7 +- .../androidaps/interfaces/PumpDescription.kt | 3 + .../plugins/pump/common/defs/PumpType.kt | 21 +- .../androidaps/diaconn/DiaconnG8Plugin.kt | 2 +- .../omnipod/eros/OmnipodErosPumpPlugin.java | 2 +- 10 files changed, 43 insertions(+), 288 deletions(-) delete mode 100644 app/src/main/res/layout/careportal_stats_fragment_lowres.xml diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt index bebdc7531c..b42626de8d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt @@ -329,19 +329,14 @@ class ActionsFragment : DaggerFragment() { val activeBgSource = activePlugin.activeBgSource historyBrowser?.visibility = (profile != null).toVisibility() fill?.visibility = (pump.pumpDescription.isRefillingCapable && pump.isInitialized() && !pump.isSuspended()).toVisibility() - if (pump is DiaconnG8Plugin) { - pumpBatteryChange?.visibility = (pump.pumpDescription.isBatteryReplaceable && !pump.isBatteryChangeLoggingEnabled()).toVisibility() - } else { - pumpBatteryChange?.visibility = - (pump.pumpDescription.isBatteryReplaceable || (pump is OmnipodErosPumpPlugin && pump.isUseRileyLinkBatteryLevel && pump.isBatteryChangeLoggingEnabled)).toVisibility() - } + pumpBatteryChange?.visibility = (pump.pumpDescription.isBatteryReplaceable || pump.isBatteryChangeLoggingEnabled()).toVisibility() tempTarget?.visibility = (profile != null && !loop.isDisconnected).toVisibility() tddStats?.visibility = pump.pumpDescription.supportsTDDs.toVisibility() val isPatchPump = pump.pumpDescription.isPatchPump cannulaOrPatch?.text = if (isPatchPump) rh.gs(R.string.patch_pump) else rh.gs(R.string.cannula) val imageResource = if (isPatchPump) R.drawable.ic_patch_pump_outline else R.drawable.ic_cp_age_cannula cannulaOrPatch?.setCompoundDrawablesWithIntrinsicBounds(imageResource, 0, 0, 0) - batteryLayout?.visibility = (!isPatchPump || pump is OmnipodErosPumpPlugin).toVisibility() + batteryLayout?.visibility = (!isPatchPump || pump.pumpDescription.useHardwareLink).toVisibility() if (!config.NSCLIENT) { statusLightHandler.updateStatusLights(cannulaAge, insulinAge, reservoirLevel, sensorAge, sensorLevel, pbAge, batteryLevel) @@ -394,4 +389,4 @@ class ActionsFragment : DaggerFragment() { for (customButton in pumpCustomButtons) buttonsLayout?.removeView(customButton) pumpCustomButtons.clear() } -} \ No newline at end of file +} 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 cbca2846c9..d2c0546d7f 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 @@ -876,13 +876,8 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList cannulaOrPatch.scaleX = if (isPatchPump) 1.4f else 2f cannulaOrPatch.scaleY = cannulaOrPatch.scaleX insulinAge.visibility = isPatchPump.not().toVisibility() - // Patch pumps discards batteries and do not need to shown the status battery light excepts for Omnipod Eros - batteryLayout.visibility = (!isPatchPump || pump is OmnipodErosPumpPlugin).toVisibility() - // Only show battery level if the action button change battery is available - val useBatteryAge = (pump is DiaconnG8Plugin && pump.pumpDescription.isBatteryReplaceable && !pump.isBatteryChangeLoggingEnabled()) - || (pump.pumpDescription.isBatteryReplaceable || (pump is OmnipodErosPumpPlugin && pump.isUseRileyLinkBatteryLevel && pump.isBatteryChangeLoggingEnabled)) - pbAge.visibility = useBatteryAge.toVisibility() - // Only show battery level when supported by pump or link + batteryLayout.visibility = (!isPatchPump || pump.pumpDescription.useHardwareLink).toVisibility() + pbAge.visibility = (pump.pumpDescription.isBatteryReplaceable || pump.isBatteryChangeLoggingEnabled()).toVisibility() val useBatteryLevel = (pump.model() == PumpType.OMNIPOD_EROS && pump is OmnipodErosPumpPlugin) || (pump.model() != PumpType.ACCU_CHEK_COMBO && pump.model() != PumpType.OMNIPOD_DASH) batteryLevel.visibility = useBatteryLevel.toVisibility() diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatusLightHandler.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatusLightHandler.kt index ba73fab429..254901adc5 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatusLightHandler.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/StatusLightHandler.kt @@ -1,7 +1,6 @@ package info.nightscout.androidaps.plugins.general.overview import android.graphics.Color -import android.view.View import android.widget.TextView import androidx.annotation.StringRes import info.nightscout.androidaps.R @@ -42,7 +41,7 @@ class StatusLightHandler @Inject constructor( handleAge(careportal_cannula_age, TherapyEvent.Type.CANNULA_CHANGE, R.string.key_statuslights_cage_warning, 48.0, R.string.key_statuslights_cage_critical, 72.0) handleAge(careportal_insulin_age, TherapyEvent.Type.INSULIN_CHANGE, R.string.key_statuslights_iage_warning, 72.0, R.string.key_statuslights_iage_critical, 144.0) handleAge(careportal_sensor_age, TherapyEvent.Type.SENSOR_CHANGE, R.string.key_statuslights_sage_warning, 216.0, R.string.key_statuslights_sage_critical, 240.0) - if (pump.pumpDescription.isBatteryReplaceable || (pump is OmnipodErosPumpPlugin && pump.isUseRileyLinkBatteryLevel && pump.isBatteryChangeLoggingEnabled)) { + if (pump.pumpDescription.isBatteryReplaceable || pump.isBatteryChangeLoggingEnabled()) { handleAge(careportal_pb_age, TherapyEvent.Type.PUMP_BATTERY_CHANGE, R.string.key_statuslights_bage_warning, 216.0, R.string.key_statuslights_bage_critical, 240.0) } if (!config.NSCLIENT) { @@ -58,16 +57,16 @@ class StatusLightHandler @Inject constructor( } if (!config.NSCLIENT) { - if (pump.model() == PumpType.OMNIPOD_DASH) { - // Omnipod Dash does not report its battery level + // The Omnipod Eros does not report its battery level. However, some RileyLink alternatives do. + // Depending on the user's configuration, we will either show the battery level reported by the RileyLink or "n/a" + // Pump instance check is needed because at startup, the pump can still be VirtualPumpPlugin and that will cause a crash + val erosBatteryLinkAvailable = pump.model() == PumpType.OMNIPOD_EROS && pump is OmnipodErosPumpPlugin && pump.isUseRileyLinkBatteryLevel + + if (pump.model().supportBatteryLevel || erosBatteryLinkAvailable) { + handleLevel(careportal_battery_level, R.string.key_statuslights_bat_critical, 26.0, R.string.key_statuslights_bat_warning, 51.0, pump.batteryLevel.toDouble(), "%") + } else { careportal_battery_level?.text = rh.gs(R.string.notavailable) careportal_battery_level?.setTextColor(Color.WHITE) - } else if (pump.model() == PumpType.OMNIPOD_EROS && pump is OmnipodErosPumpPlugin) { // instance of check is needed because at startup, pump can still be VirtualPumpPlugin and that will cause a crash because of the class cast below - // The Omnipod Eros does not report its battery level. However, some RileyLink alternatives do. - // Depending on the user's configuration, we will either show the battery level reported by the RileyLink or "n/a" - handleOmnipodErosBatteryLevel(careportal_battery_level, R.string.key_statuslights_bat_critical, 26.0, R.string.key_statuslights_bat_warning, 51.0, pump.batteryLevel.toDouble(), "%", pump.isUseRileyLinkBatteryLevel) - } else if (pump.model() != PumpType.ACCU_CHEK_COMBO) { - handleLevel(careportal_battery_level, R.string.key_statuslights_bat_critical, 26.0, R.string.key_statuslights_bat_warning, 51.0, pump.batteryLevel.toDouble(), "%") } } } @@ -104,13 +103,4 @@ class StatusLightHandler @Inject constructor( } } - @Suppress("SameParameterValue") - private fun handleOmnipodErosBatteryLevel(view: TextView?, criticalSetting: Int, criticalDefaultValue: Double, warnSetting: Int, warnDefaultValue: Double, level: Double, units: String, useRileyLinkBatteryLevel: Boolean) { - if (useRileyLinkBatteryLevel) { - handleLevel(view, criticalSetting, criticalDefaultValue, warnSetting, warnDefaultValue, level, units) - } else { - view?.text = rh.gs(R.string.notavailable) - view?.setTextColor(Color.WHITE) - } - } -} \ No newline at end of file +} diff --git a/app/src/main/res/layout/careportal_stats_fragment.xml b/app/src/main/res/layout/careportal_stats_fragment.xml index 5763e51ad0..0e82a5345e 100644 --- a/app/src/main/res/layout/careportal_stats_fragment.xml +++ b/app/src/main/res/layout/careportal_stats_fragment.xml @@ -288,20 +288,4 @@ - - - - - - diff --git a/app/src/main/res/layout/careportal_stats_fragment_lowres.xml b/app/src/main/res/layout/careportal_stats_fragment_lowres.xml deleted file mode 100644 index e005b91399..0000000000 --- a/app/src/main/res/layout/careportal_stats_fragment_lowres.xml +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/Pump.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/Pump.kt index c044aee4cb..f736a314d4 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/Pump.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/Pump.kt @@ -276,4 +276,9 @@ interface Pump { * if true APS set 100% basal before full hour to avoid pump beeping */ fun setNeutralTempAtFullHour(): Boolean = false -} \ No newline at end of file + + /** + * Pumps with a hardware link can set via config "Battery Change Logging" + */ + fun isBatteryChangeLoggingEnabled(): Boolean = false +} diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.kt index 6651791efa..e6d5eff434 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.kt @@ -39,6 +39,7 @@ class PumpDescription() { var needsManualTDDLoad = false var hasCustomUnreachableAlertCheck = false var isPatchPump = false + var useHardwareLink = false fun resetSettings() { isBolusCapable = true @@ -68,6 +69,7 @@ class PumpDescription() { supportsTDDs = false needsManualTDDLoad = true hasCustomUnreachableAlertCheck = false + useHardwareLink = false } fun fillFor(pumpType: PumpType) { @@ -105,6 +107,7 @@ class PumpDescription() { is30minBasalRatesCapable = pumpCapability.hasCapability(PumpCapability.BasalRate30min) hasCustomUnreachableAlertCheck = pumpType.hasCustomUnreachableAlertCheck isPatchPump = pumpType.isPatchPump + useHardwareLink = pumpType.useHardwareLink } companion object { diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.kt b/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.kt index 575fd2a536..9e5ee7c4e2 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.kt @@ -52,7 +52,8 @@ enum class PumpType { baseBasalStep = 0.01, baseBasalSpecialSteps = DoseStepSize.ComboBasal, pumpCapability = PumpCapability.ComboCapabilities, - source = Sources.Combo), + source = Sources.Combo, + supportBatteryLevel = false), ACCU_CHEK_SPIRIT(description = "Accu-Chek Spirit", manufacturer = ManufacturerType.Roche, model = "Spirit", @@ -185,6 +186,8 @@ enum class PumpType { pumpCapability = PumpCapability.OmnipodCapabilities, hasCustomUnreachableAlertCheck = true, isPatchPump = true, + useHardwareLink = true, + supportBatteryLevel = false, source = Sources.OmnipodEros), OMNIPOD_DASH(description = "Omnipod Dash", manufacturer = ManufacturerType.Insulet, @@ -201,7 +204,8 @@ enum class PumpType { baseBasalSpecialSteps = null, isPatchPump = true, pumpCapability = PumpCapability.OmnipodCapabilities, - hasCustomUnreachableAlertCheck = false), + hasCustomUnreachableAlertCheck = false, + supportBatteryLevel = false), MEDTRONIC_512_712(description = "Medtronic 512/712", manufacturer = ManufacturerType.Medtronic, model = "512/712", @@ -313,7 +317,8 @@ enum class PumpType { baseBasalStep = 0.01, baseBasalSpecialSteps = null, pumpCapability = PumpCapability.DanaWithHistoryCapabilities, - source = Sources.DiaconnG8); + source = Sources.DiaconnG8, + useHardwareLink = true); val description: String var manufacturer: ManufacturerType? = null @@ -356,6 +361,10 @@ enum class PumpType { private set var isPatchPump = false private set + var supportBatteryLevel = true + private set + var useHardwareLink = false + private set private var parent: PumpType? = null val source: Sources @@ -424,6 +433,8 @@ enum class PumpType { pumpCapability: PumpCapability, hasCustomUnreachableAlertCheck: Boolean = false, isPatchPump: Boolean = false, + supportBatteryLevel: Boolean = true, + useHardwareLink: Boolean = false, source: Sources = Sources.VirtualPump) { this.description = description this.manufacturer = manufacturer @@ -441,6 +452,8 @@ enum class PumpType { this.pumpCapability = pumpCapability this.hasCustomUnreachableAlertCheck = hasCustomUnreachableAlertCheck this.isPatchPump = isPatchPump + this.supportBatteryLevel = supportBatteryLevel + this.useHardwareLink = useHardwareLink this.source = source } @@ -518,4 +531,4 @@ enum class PumpType { USER -> InterfaceIDs.PumpType.USER DIACONN_G8 -> InterfaceIDs.PumpType.DIACONN_G8 } -} \ No newline at end of file +} diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt index b321cadaa5..92bbdb12f7 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt @@ -542,7 +542,7 @@ class DiaconnG8Plugin @Inject constructor( override fun executeCustomAction(customActionType: CustomActionType) {} override fun canHandleDST(): Boolean = false - fun isBatteryChangeLoggingEnabled():Boolean { + override fun isBatteryChangeLoggingEnabled():Boolean { return sp.getBoolean(R.string.key_diaconn_g8_logbatterychange, false) } diff --git a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java index c6f39aad69..ec565e9237 100644 --- a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java +++ b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java @@ -1083,7 +1083,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements Pump, Riley return aapsOmnipodErosManager.isShowRileyLinkBatteryLevel(); } - public boolean isBatteryChangeLoggingEnabled() { + @Override public boolean isBatteryChangeLoggingEnabled() { return aapsOmnipodErosManager.isBatteryChangeLoggingEnabled(); }