DisableStoreCarbsInfo at all

This commit is contained in:
Milos Kozak 2022-09-19 15:25:04 +02:00
parent 353fd727f6
commit 447fcded2e
5 changed files with 11 additions and 10 deletions

View file

@ -544,7 +544,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
// **** Various treatment buttons **** // **** Various treatment buttons ****
binding.buttonsLayout.carbsButton.visibility = 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() && sp.getBoolean(R.string.key_show_carbs_button, true)).toVisibility()
binding.buttonsLayout.treatmentButton.visibility = (!loop.isDisconnected && pump.isInitialized() && !pump.isSuspended() && profile != null binding.buttonsLayout.treatmentButton.visibility = (!loop.isDisconnected && pump.isInitialized() && !pump.isSuspended() && profile != null
&& sp.getBoolean(R.string.key_show_treatment_button, false)).toVisibility() && sp.getBoolean(R.string.key_show_treatment_button, false)).toVisibility()

View file

@ -91,7 +91,7 @@ open class VirtualPumpPlugin @Inject constructor(
it.basalStep = 0.01 it.basalStep = 0.01
it.basalMinimumRate = 0.01 it.basalMinimumRate = 0.01
it.isRefillingCapable = true it.isRefillingCapable = true
it.storesCarbInfo = false //it.storesCarbInfo = false
it.is30minBasalRatesCapable = true it.is30minBasalRatesCapable = true
} }

View file

@ -232,10 +232,10 @@ class CommandQueueImplementation @Inject constructor(
var carbsRunnable = Runnable { } var carbsRunnable = Runnable { }
val originalCarbs = detailedBolusInfo.carbs val originalCarbs = detailedBolusInfo.carbs
if ((detailedBolusInfo.carbs > 0) && if ((detailedBolusInfo.carbs > 0) /*&&
(!activePlugin.activePump.pumpDescription.storesCarbInfo || (!activePlugin.activePump.pumpDescription.storesCarbInfo ||
detailedBolusInfo.carbsDuration != 0L || detailedBolusInfo.carbsDuration != 0L ||
(detailedBolusInfo.carbsTimestamp ?: detailedBolusInfo.timestamp) > dateUtil.now()) (detailedBolusInfo.carbsTimestamp ?: detailedBolusInfo.timestamp) > dateUtil.now())*/
) { ) {
carbsRunnable = Runnable { carbsRunnable = Runnable {
aapsLogger.debug(LTag.PUMPQUEUE, "Going to store carbs") aapsLogger.debug(LTag.PUMPQUEUE, "Going to store carbs")

View file

@ -33,7 +33,7 @@ class PumpDescription() {
var basalMaximumRate = 0.0 var basalMaximumRate = 0.0
var isRefillingCapable = false var isRefillingCapable = false
var isBatteryReplaceable = false var isBatteryReplaceable = false
var storesCarbInfo = false //var storesCarbInfo = false
var is30minBasalRatesCapable = false var is30minBasalRatesCapable = false
var supportsTDDs = false var supportsTDDs = false
var needsManualTDDLoad = false var needsManualTDDLoad = false
@ -41,7 +41,7 @@ class PumpDescription() {
var isPatchPump = false var isPatchPump = false
var useHardwareLink = false var useHardwareLink = false
fun resetSettings() { private fun resetSettings() {
isBolusCapable = true isBolusCapable = true
bolusStep = 0.1 bolusStep = 0.1
isExtendedBolusCapable = true isExtendedBolusCapable = true
@ -65,7 +65,7 @@ class PumpDescription() {
is30minBasalRatesCapable = false is30minBasalRatesCapable = false
isRefillingCapable = true isRefillingCapable = true
isBatteryReplaceable = true isBatteryReplaceable = true
storesCarbInfo = false //storesCarbInfo = false
supportsTDDs = false supportsTDDs = false
needsManualTDDLoad = true needsManualTDDLoad = true
hasCustomUnreachableAlertCheck = false hasCustomUnreachableAlertCheck = false
@ -101,7 +101,7 @@ class PumpDescription() {
basalMinimumRate = pumpType.baseBasalMinValue basalMinimumRate = pumpType.baseBasalMinValue
isRefillingCapable = pumpCapability.hasCapability(PumpCapability.Refill) isRefillingCapable = pumpCapability.hasCapability(PumpCapability.Refill)
isBatteryReplaceable = pumpCapability.hasCapability(PumpCapability.ReplaceBattery) isBatteryReplaceable = pumpCapability.hasCapability(PumpCapability.ReplaceBattery)
storesCarbInfo = pumpCapability.hasCapability(PumpCapability.StoreCarbInfo) //storesCarbInfo = pumpCapability.hasCapability(PumpCapability.StoreCarbInfo)
supportsTDDs = pumpCapability.hasCapability(PumpCapability.TDD) supportsTDDs = pumpCapability.hasCapability(PumpCapability.TDD)
needsManualTDDLoad = pumpCapability.hasCapability(PumpCapability.ManualTDDLoad) needsManualTDDLoad = pumpCapability.hasCapability(PumpCapability.ManualTDDLoad)
is30minBasalRatesCapable = pumpCapability.hasCapability(PumpCapability.BasalRate30min) is30minBasalRatesCapable = pumpCapability.hasCapability(PumpCapability.BasalRate30min)

View file

@ -8,7 +8,7 @@ enum class PumpCapability {
BasalProfileSet, // isSetBasalProfileCapable BasalProfileSet, // isSetBasalProfileCapable
Refill, // isRefillingCapable Refill, // isRefillingCapable
ReplaceBattery, // isBatteryReplaceable ReplaceBattery, // isBatteryReplaceable
StoreCarbInfo, // storesCarbInfo // StoreCarbInfo, // removed. incompatible with storing notes with carbs
TDD, // supportsTDDs TDD, // supportsTDDs
ManualTDDLoad, // needsManualTDDLoad ManualTDDLoad, // needsManualTDDLoad
BasalRate30min, // is30minBasalRatesCapable BasalRate30min, // is30minBasalRatesCapable
@ -18,7 +18,8 @@ enum class PumpCapability {
VirtualPumpCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery)), VirtualPumpCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery)),
ComboCapabilities(arrayOf(Bolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD, ManualTDDLoad)), ComboCapabilities(arrayOf(Bolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD, ManualTDDLoad)),
DanaCapabilities(arrayOf(Bolus, ExtendedBolus, 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)), InsightCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD, BasalRate30min)),
MedtronicCapabilities(arrayOf(Bolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD)), MedtronicCapabilities(arrayOf(Bolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD)),
OmnipodCapabilities(arrayOf(Bolus, TempBasal, BasalProfileSet, BasalRate30min)), OmnipodCapabilities(arrayOf(Bolus, TempBasal, BasalProfileSet, BasalRate30min)),