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 54a2bbcb40..95bd68ec99 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 @@ -544,7 +544,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList // **** Various treatment buttons **** binding.buttonsLayout.carbsButton.visibility = - ((!activePlugin.activePump.pumpDescription.storesCarbInfo || pump.isInitialized() && !pump.isSuspended()) && profile != null + (/*(!activePlugin.activePump.pumpDescription.storesCarbInfo || pump.isInitialized() && !pump.isSuspended()) &&*/ profile != null && sp.getBoolean(R.string.key_show_carbs_button, true)).toVisibility() binding.buttonsLayout.treatmentButton.visibility = (!loop.isDisconnected && pump.isInitialized() && !pump.isSuspended() && profile != null && sp.getBoolean(R.string.key_show_treatment_button, false)).toVisibility() diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPlugin.kt index 0284ce9259..12ac04a0b8 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPlugin.kt @@ -91,7 +91,7 @@ open class VirtualPumpPlugin @Inject constructor( it.basalStep = 0.01 it.basalMinimumRate = 0.01 it.isRefillingCapable = true - it.storesCarbInfo = false + //it.storesCarbInfo = false it.is30minBasalRatesCapable = true } diff --git a/app/src/main/java/info/nightscout/androidaps/queue/CommandQueueImplementation.kt b/app/src/main/java/info/nightscout/androidaps/queue/CommandQueueImplementation.kt index f8ba452203..fc3e39daa6 100644 --- a/app/src/main/java/info/nightscout/androidaps/queue/CommandQueueImplementation.kt +++ b/app/src/main/java/info/nightscout/androidaps/queue/CommandQueueImplementation.kt @@ -232,10 +232,10 @@ class CommandQueueImplementation @Inject constructor( var carbsRunnable = Runnable { } val originalCarbs = detailedBolusInfo.carbs - if ((detailedBolusInfo.carbs > 0) && + if ((detailedBolusInfo.carbs > 0) /*&& (!activePlugin.activePump.pumpDescription.storesCarbInfo || detailedBolusInfo.carbsDuration != 0L || - (detailedBolusInfo.carbsTimestamp ?: detailedBolusInfo.timestamp) > dateUtil.now()) + (detailedBolusInfo.carbsTimestamp ?: detailedBolusInfo.timestamp) > dateUtil.now())*/ ) { carbsRunnable = Runnable { aapsLogger.debug(LTag.PUMPQUEUE, "Going to store carbs") 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 e6d5eff434..eed259d3e8 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/PumpDescription.kt @@ -33,7 +33,7 @@ class PumpDescription() { var basalMaximumRate = 0.0 var isRefillingCapable = false var isBatteryReplaceable = false - var storesCarbInfo = false + //var storesCarbInfo = false var is30minBasalRatesCapable = false var supportsTDDs = false var needsManualTDDLoad = false @@ -41,7 +41,7 @@ class PumpDescription() { var isPatchPump = false var useHardwareLink = false - fun resetSettings() { + private fun resetSettings() { isBolusCapable = true bolusStep = 0.1 isExtendedBolusCapable = true @@ -65,7 +65,7 @@ class PumpDescription() { is30minBasalRatesCapable = false isRefillingCapable = true isBatteryReplaceable = true - storesCarbInfo = false + //storesCarbInfo = false supportsTDDs = false needsManualTDDLoad = true hasCustomUnreachableAlertCheck = false @@ -101,7 +101,7 @@ class PumpDescription() { basalMinimumRate = pumpType.baseBasalMinValue isRefillingCapable = pumpCapability.hasCapability(PumpCapability.Refill) isBatteryReplaceable = pumpCapability.hasCapability(PumpCapability.ReplaceBattery) - storesCarbInfo = pumpCapability.hasCapability(PumpCapability.StoreCarbInfo) + //storesCarbInfo = pumpCapability.hasCapability(PumpCapability.StoreCarbInfo) supportsTDDs = pumpCapability.hasCapability(PumpCapability.TDD) needsManualTDDLoad = pumpCapability.hasCapability(PumpCapability.ManualTDDLoad) is30minBasalRatesCapable = pumpCapability.hasCapability(PumpCapability.BasalRate30min) diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpCapability.kt b/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpCapability.kt index 1ceac452df..047cdec681 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpCapability.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpCapability.kt @@ -8,7 +8,7 @@ enum class PumpCapability { BasalProfileSet, // isSetBasalProfileCapable Refill, // isRefillingCapable ReplaceBattery, // isBatteryReplaceable - StoreCarbInfo, // storesCarbInfo + // StoreCarbInfo, // removed. incompatible with storing notes with carbs TDD, // supportsTDDs ManualTDDLoad, // needsManualTDDLoad BasalRate30min, // is30minBasalRatesCapable @@ -18,7 +18,8 @@ enum class PumpCapability { VirtualPumpCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery)), ComboCapabilities(arrayOf(Bolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD, ManualTDDLoad)), DanaCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD, ManualTDDLoad)), - DanaWithHistoryCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, StoreCarbInfo, TDD, ManualTDDLoad)), + //DanaWithHistoryCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, StoreCarbInfo, TDD, ManualTDDLoad)), + DanaWithHistoryCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD, ManualTDDLoad)), InsightCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD, BasalRate30min)), MedtronicCapabilities(arrayOf(Bolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD)), OmnipodCapabilities(arrayOf(Bolus, TempBasal, BasalProfileSet, BasalRate30min)),