Combo: remove core dependency
This commit is contained in:
parent
bd9c149b80
commit
dcd86e26a4
|
@ -24,8 +24,6 @@ import info.nightscout.androidaps.danars.DanaRSPlugin
|
||||||
import info.nightscout.androidaps.diaconn.DiaconnG8Plugin
|
import info.nightscout.androidaps.diaconn.DiaconnG8Plugin
|
||||||
import info.nightscout.androidaps.plugin.general.openhumans.OpenHumansUploaderPlugin
|
import info.nightscout.androidaps.plugin.general.openhumans.OpenHumansUploaderPlugin
|
||||||
import info.nightscout.androidaps.plugins.general.maintenance.MaintenancePlugin
|
import info.nightscout.androidaps.plugins.general.maintenance.MaintenancePlugin
|
||||||
import info.nightscout.plugins.general.wear.WearPlugin
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ComboPlugin
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combov2.ComboV2Plugin
|
import info.nightscout.androidaps.plugins.pump.combov2.ComboV2Plugin
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.EopatchPumpPlugin
|
import info.nightscout.androidaps.plugins.pump.eopatch.EopatchPumpPlugin
|
||||||
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin
|
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin
|
||||||
|
@ -45,6 +43,7 @@ import info.nightscout.interfaces.protection.ProtectionCheck.ProtectionType.NONE
|
||||||
import info.nightscout.plugins.aps.loop.LoopPlugin
|
import info.nightscout.plugins.aps.loop.LoopPlugin
|
||||||
import info.nightscout.plugins.constraints.safety.SafetyPlugin
|
import info.nightscout.plugins.constraints.safety.SafetyPlugin
|
||||||
import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin
|
import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin
|
||||||
|
import info.nightscout.plugins.general.wear.WearPlugin
|
||||||
import info.nightscout.plugins.general.xdripStatusline.StatusLinePlugin
|
import info.nightscout.plugins.general.xdripStatusline.StatusLinePlugin
|
||||||
import info.nightscout.plugins.insulin.InsulinOrefFreePeakPlugin
|
import info.nightscout.plugins.insulin.InsulinOrefFreePeakPlugin
|
||||||
import info.nightscout.plugins.pump.virtual.VirtualPumpPlugin
|
import info.nightscout.plugins.pump.virtual.VirtualPumpPlugin
|
||||||
|
@ -60,6 +59,7 @@ import info.nightscout.plugins.sync.nsclient.NSClientPlugin
|
||||||
import info.nightscout.plugins.sync.nsclient.data.NSSettingsStatus
|
import info.nightscout.plugins.sync.nsclient.data.NSSettingsStatus
|
||||||
import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin
|
import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin
|
||||||
import info.nightscout.plugins.sync.tidepool.TidepoolPlugin
|
import info.nightscout.plugins.sync.tidepool.TidepoolPlugin
|
||||||
|
import info.nightscout.pump.combo.ComboPlugin
|
||||||
import info.nightscout.rx.bus.RxBus
|
import info.nightscout.rx.bus.RxBus
|
||||||
import info.nightscout.rx.events.EventPreferenceChange
|
import info.nightscout.rx.events.EventPreferenceChange
|
||||||
import info.nightscout.rx.events.EventRebuildTabs
|
import info.nightscout.rx.events.EventRebuildTabs
|
||||||
|
|
|
@ -5,7 +5,6 @@ import dagger.Component
|
||||||
import dagger.android.AndroidInjectionModule
|
import dagger.android.AndroidInjectionModule
|
||||||
import dagger.android.AndroidInjector
|
import dagger.android.AndroidInjector
|
||||||
import info.nightscout.androidaps.MainApp
|
import info.nightscout.androidaps.MainApp
|
||||||
import info.nightscout.androidaps.combo.di.ComboModule
|
|
||||||
import info.nightscout.androidaps.combov2.di.ComboV2Module
|
import info.nightscout.androidaps.combov2.di.ComboV2Module
|
||||||
import info.nightscout.androidaps.dana.di.DanaHistoryModule
|
import info.nightscout.androidaps.dana.di.DanaHistoryModule
|
||||||
import info.nightscout.androidaps.dana.di.DanaModule
|
import info.nightscout.androidaps.dana.di.DanaModule
|
||||||
|
@ -28,6 +27,7 @@ import info.nightscout.database.impl.DatabaseModule
|
||||||
import info.nightscout.implementation.di.ImplementationModule
|
import info.nightscout.implementation.di.ImplementationModule
|
||||||
import info.nightscout.plugins.aps.di.ApsModule
|
import info.nightscout.plugins.aps.di.ApsModule
|
||||||
import info.nightscout.plugins.di.PluginsModule
|
import info.nightscout.plugins.di.PluginsModule
|
||||||
|
import info.nightscout.pump.combo.di.ComboModule
|
||||||
import info.nightscout.rx.di.RxModule
|
import info.nightscout.rx.di.RxModule
|
||||||
import info.nightscout.shared.di.SharedModule
|
import info.nightscout.shared.di.SharedModule
|
||||||
import info.nightscout.shared.impl.di.SharedImplModule
|
import info.nightscout.shared.impl.di.SharedImplModule
|
||||||
|
|
|
@ -14,8 +14,6 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
|
||||||
import info.nightscout.androidaps.plugins.general.maintenance.MaintenancePlugin
|
import info.nightscout.androidaps.plugins.general.maintenance.MaintenancePlugin
|
||||||
import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin
|
import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin
|
||||||
import info.nightscout.androidaps.plugins.general.persistentNotification.PersistentNotificationPlugin
|
import info.nightscout.androidaps.plugins.general.persistentNotification.PersistentNotificationPlugin
|
||||||
import info.nightscout.plugins.general.wear.WearPlugin
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ComboPlugin
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combov2.ComboV2Plugin
|
import info.nightscout.androidaps.plugins.pump.combov2.ComboV2Plugin
|
||||||
import info.nightscout.androidaps.plugins.pump.eopatch.EopatchPumpPlugin
|
import info.nightscout.androidaps.plugins.pump.eopatch.EopatchPumpPlugin
|
||||||
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin
|
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin
|
||||||
|
@ -41,6 +39,7 @@ import info.nightscout.plugins.general.dataBroadcaster.DataBroadcastPlugin
|
||||||
import info.nightscout.plugins.general.food.FoodPlugin
|
import info.nightscout.plugins.general.food.FoodPlugin
|
||||||
import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin
|
import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin
|
||||||
import info.nightscout.plugins.general.themes.ThemeSwitcherPlugin
|
import info.nightscout.plugins.general.themes.ThemeSwitcherPlugin
|
||||||
|
import info.nightscout.plugins.general.wear.WearPlugin
|
||||||
import info.nightscout.plugins.general.xdripStatusline.StatusLinePlugin
|
import info.nightscout.plugins.general.xdripStatusline.StatusLinePlugin
|
||||||
import info.nightscout.plugins.insulin.InsulinLyumjevPlugin
|
import info.nightscout.plugins.insulin.InsulinLyumjevPlugin
|
||||||
import info.nightscout.plugins.insulin.InsulinOrefFreePeakPlugin
|
import info.nightscout.plugins.insulin.InsulinOrefFreePeakPlugin
|
||||||
|
@ -63,6 +62,7 @@ import info.nightscout.plugins.source.XdripPlugin
|
||||||
import info.nightscout.plugins.sync.nsclient.NSClientPlugin
|
import info.nightscout.plugins.sync.nsclient.NSClientPlugin
|
||||||
import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin
|
import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin
|
||||||
import info.nightscout.plugins.sync.tidepool.TidepoolPlugin
|
import info.nightscout.plugins.sync.tidepool.TidepoolPlugin
|
||||||
|
import info.nightscout.pump.combo.ComboPlugin
|
||||||
import info.nightscout.sensitivity.SensitivityAAPSPlugin
|
import info.nightscout.sensitivity.SensitivityAAPSPlugin
|
||||||
import info.nightscout.sensitivity.SensitivityOref1Plugin
|
import info.nightscout.sensitivity.SensitivityOref1Plugin
|
||||||
import info.nightscout.sensitivity.SensitivityWeightedAveragePlugin
|
import info.nightscout.sensitivity.SensitivityWeightedAveragePlugin
|
||||||
|
|
|
@ -11,7 +11,10 @@ import info.nightscout.androidaps.activities.HistoryBrowseActivity
|
||||||
import info.nightscout.androidaps.activities.MyPreferenceFragment
|
import info.nightscout.androidaps.activities.MyPreferenceFragment
|
||||||
import info.nightscout.androidaps.activities.PreferencesActivity
|
import info.nightscout.androidaps.activities.PreferencesActivity
|
||||||
import info.nightscout.androidaps.services.AlarmSoundService
|
import info.nightscout.androidaps.services.AlarmSoundService
|
||||||
|
import info.nightscout.core.events.EventNewNotification
|
||||||
|
import info.nightscout.interfaces.notifications.Notification
|
||||||
import info.nightscout.interfaces.ui.ActivityNames
|
import info.nightscout.interfaces.ui.ActivityNames
|
||||||
|
import info.nightscout.rx.bus.RxBus
|
||||||
import info.nightscout.ui.activities.BolusProgressHelperActivity
|
import info.nightscout.ui.activities.BolusProgressHelperActivity
|
||||||
import info.nightscout.ui.activities.ErrorHelperActivity
|
import info.nightscout.ui.activities.ErrorHelperActivity
|
||||||
import info.nightscout.ui.activities.SingleFragmentActivity
|
import info.nightscout.ui.activities.SingleFragmentActivity
|
||||||
|
@ -27,7 +30,9 @@ import info.nightscout.ui.dialogs.TempTargetDialog
|
||||||
import info.nightscout.ui.dialogs.WizardDialog
|
import info.nightscout.ui.dialogs.WizardDialog
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class ActivityNamesImpl @Inject constructor() : ActivityNames {
|
class ActivityNamesImpl @Inject constructor(
|
||||||
|
private val rxBus: RxBus
|
||||||
|
) : ActivityNames {
|
||||||
|
|
||||||
override val mainActivity: Class<*> = MainActivity::class.java
|
override val mainActivity: Class<*> = MainActivity::class.java
|
||||||
override val tddStatsActivity: Class<*> = TDDStatsActivity::class.java
|
override val tddStatsActivity: Class<*> = TDDStatsActivity::class.java
|
||||||
|
@ -114,4 +119,20 @@ class ActivityNamesImpl @Inject constructor() : ActivityNames {
|
||||||
it.show(fragmentManager, "BolusProgress")
|
it.show(fragmentManager, "BolusProgress")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun addNotification(id: Int, text: String, level: Int) {
|
||||||
|
rxBus.send(EventNewNotification(Notification(id, text, level)))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun addNotificationValidFor(id: Int, text: String, level: Int, validMinutes: Int) {
|
||||||
|
rxBus.send(EventNewNotification(Notification(id, text, level, validMinutes)))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun addNotificationWithSound(id: Int, text: String, level: Int, soundId: Int) {
|
||||||
|
rxBus.send(EventNewNotification(Notification(id, text, level).also { it.soundId = soundId }))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun addNotificationValidTo(id: Int, date: Long, text: String, level: Int, validTo: Long) {
|
||||||
|
rxBus.send(EventNewNotification(Notification(id, System.currentTimeMillis(), text, level,validTo)))
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -12,8 +12,6 @@ import info.nightscout.androidaps.implementations.ConfigImpl
|
||||||
import info.nightscout.androidaps.insight.database.InsightDatabaseDao
|
import info.nightscout.androidaps.insight.database.InsightDatabaseDao
|
||||||
import info.nightscout.androidaps.insight.database.InsightDbHelper
|
import info.nightscout.androidaps.insight.database.InsightDbHelper
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ComboPlugin
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.RuffyScripter
|
|
||||||
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin
|
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin
|
||||||
import info.nightscout.database.impl.AppRepository
|
import info.nightscout.database.impl.AppRepository
|
||||||
import info.nightscout.implementation.constraints.ConstraintsImpl
|
import info.nightscout.implementation.constraints.ConstraintsImpl
|
||||||
|
@ -31,12 +29,15 @@ import info.nightscout.interfaces.pump.PumpSync
|
||||||
import info.nightscout.interfaces.pump.TemporaryBasalStorage
|
import info.nightscout.interfaces.pump.TemporaryBasalStorage
|
||||||
import info.nightscout.interfaces.pump.defs.PumpDescription
|
import info.nightscout.interfaces.pump.defs.PumpDescription
|
||||||
import info.nightscout.interfaces.queue.CommandQueue
|
import info.nightscout.interfaces.queue.CommandQueue
|
||||||
|
import info.nightscout.interfaces.ui.ActivityNames
|
||||||
import info.nightscout.interfaces.utils.HardLimits
|
import info.nightscout.interfaces.utils.HardLimits
|
||||||
import info.nightscout.plugins.constraints.objectives.ObjectivesPlugin
|
import info.nightscout.plugins.constraints.objectives.ObjectivesPlugin
|
||||||
import info.nightscout.plugins.constraints.objectives.objectives.Objective
|
import info.nightscout.plugins.constraints.objectives.objectives.Objective
|
||||||
import info.nightscout.plugins.constraints.safety.SafetyPlugin
|
import info.nightscout.plugins.constraints.safety.SafetyPlugin
|
||||||
import info.nightscout.plugins.pump.virtual.VirtualPumpPlugin
|
import info.nightscout.plugins.pump.virtual.VirtualPumpPlugin
|
||||||
import info.nightscout.plugins.source.GlimpPlugin
|
import info.nightscout.plugins.source.GlimpPlugin
|
||||||
|
import info.nightscout.pump.combo.ComboPlugin
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.RuffyScripter
|
||||||
import info.nightscout.shared.sharedPreferences.SP
|
import info.nightscout.shared.sharedPreferences.SP
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
|
@ -62,6 +63,7 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
|
||||||
@Mock lateinit var pumpSync: PumpSync
|
@Mock lateinit var pumpSync: PumpSync
|
||||||
@Mock lateinit var insightDatabaseDao: InsightDatabaseDao
|
@Mock lateinit var insightDatabaseDao: InsightDatabaseDao
|
||||||
@Mock lateinit var ruffyScripter: RuffyScripter
|
@Mock lateinit var ruffyScripter: RuffyScripter
|
||||||
|
@Mock lateinit var activityNames: ActivityNames
|
||||||
|
|
||||||
private lateinit var hardLimits: HardLimits
|
private lateinit var hardLimits: HardLimits
|
||||||
private lateinit var danaPump: DanaPump
|
private lateinit var danaPump: DanaPump
|
||||||
|
@ -93,7 +95,7 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
|
||||||
fun prepare() {
|
fun prepare() {
|
||||||
`when`(rh.gs(R.string.closed_loop_disabled_on_dev_branch)).thenReturn("Running dev version. Closed loop is disabled.")
|
`when`(rh.gs(R.string.closed_loop_disabled_on_dev_branch)).thenReturn("Running dev version. Closed loop is disabled.")
|
||||||
`when`(rh.gs(R.string.closedmodedisabledinpreferences)).thenReturn("Closed loop mode disabled in preferences")
|
`when`(rh.gs(R.string.closedmodedisabledinpreferences)).thenReturn("Closed loop mode disabled in preferences")
|
||||||
`when`(rh.gs(R.string.novalidbasalrate)).thenReturn("No valid basal rate read from pump")
|
`when`(rh.gs(info.nightscout.ui.R.string.no_valid_basal_rate)).thenReturn("No valid basal rate read from pump")
|
||||||
`when`(rh.gs(R.string.autosens_disabled_in_preferences)).thenReturn("Autosens disabled in preferences")
|
`when`(rh.gs(R.string.autosens_disabled_in_preferences)).thenReturn("Autosens disabled in preferences")
|
||||||
`when`(rh.gs(R.string.smb_disabled_in_preferences)).thenReturn("SMB disabled in preferences")
|
`when`(rh.gs(R.string.smb_disabled_in_preferences)).thenReturn("SMB disabled in preferences")
|
||||||
`when`(rh.gs(R.string.pumplimit)).thenReturn("pump limit")
|
`when`(rh.gs(R.string.pumplimit)).thenReturn("pump limit")
|
||||||
|
@ -106,7 +108,7 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
|
||||||
`when`(rh.gs(R.string.hardlimit)).thenReturn("hard limit")
|
`when`(rh.gs(R.string.hardlimit)).thenReturn("hard limit")
|
||||||
`when`(rh.gs(R.string.key_child)).thenReturn("child")
|
`when`(rh.gs(R.string.key_child)).thenReturn("child")
|
||||||
`when`(rh.gs(R.string.limitingcarbs)).thenReturn("Limiting carbs to %d g because of %s")
|
`when`(rh.gs(R.string.limitingcarbs)).thenReturn("Limiting carbs to %d g because of %s")
|
||||||
`when`(rh.gs(R.string.limitingiob)).thenReturn("Limiting IOB to %.1f U because of %s")
|
`when`(rh.gs(info.nightscout.ui.R.string.limiting_iob)).thenReturn("Limiting IOB to %.1f U because of %s")
|
||||||
`when`(rh.gs(R.string.limitingbasalratio)).thenReturn("Limiting max basal rate to %1\$.2f U/h because of %2\$s")
|
`when`(rh.gs(R.string.limitingbasalratio)).thenReturn("Limiting max basal rate to %1\$.2f U/h because of %2\$s")
|
||||||
`when`(rh.gs(R.string.limitingpercentrate)).thenReturn("Limiting max percent rate to %1\$d%% because of %2\$s")
|
`when`(rh.gs(R.string.limitingpercentrate)).thenReturn("Limiting max percent rate to %1\$d%% because of %2\$s")
|
||||||
`when`(rh.gs(R.string.itmustbepositivevalue)).thenReturn("it must be positive value")
|
`when`(rh.gs(R.string.itmustbepositivevalue)).thenReturn("it must be positive value")
|
||||||
|
@ -132,7 +134,7 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
|
||||||
insightDbHelper = InsightDbHelper(insightDatabaseDao)
|
insightDbHelper = InsightDbHelper(insightDatabaseDao)
|
||||||
danaPump = DanaPump(aapsLogger, sp, dateUtil, injector)
|
danaPump = DanaPump(aapsLogger, sp, dateUtil, injector)
|
||||||
objectivesPlugin = ObjectivesPlugin(injector, aapsLogger, rh, activePlugin, sp, config)
|
objectivesPlugin = ObjectivesPlugin(injector, aapsLogger, rh, activePlugin, sp, config)
|
||||||
comboPlugin = ComboPlugin(injector, aapsLogger, rxBus, rh, profileFunction, sp, commandQueue, pumpSync, dateUtil, ruffyScripter)
|
comboPlugin = ComboPlugin(injector, aapsLogger, rxBus, rh, profileFunction, sp, commandQueue, pumpSync, dateUtil, ruffyScripter, activityNames)
|
||||||
danaRPlugin = DanaRPlugin(injector, aapsLogger, aapsSchedulers, rxBus, context, rh, constraintChecker, activePlugin, sp, commandQueue, danaPump, dateUtil, fabricPrivacy, pumpSync)
|
danaRPlugin = DanaRPlugin(injector, aapsLogger, aapsSchedulers, rxBus, context, rh, constraintChecker, activePlugin, sp, commandQueue, danaPump, dateUtil, fabricPrivacy, pumpSync)
|
||||||
danaRSPlugin =
|
danaRSPlugin =
|
||||||
DanaRSPlugin(
|
DanaRSPlugin(
|
||||||
|
|
|
@ -56,7 +56,7 @@ class SafetyPluginTest : TestBaseWithProfile() {
|
||||||
`when`(rh.gs(info.nightscout.plugins.aps.R.string.max_basal_multiplier)).thenReturn("max basal multiplier")
|
`when`(rh.gs(info.nightscout.plugins.aps.R.string.max_basal_multiplier)).thenReturn("max basal multiplier")
|
||||||
`when`(rh.gs(R.string.limitingbolus)).thenReturn("Limiting bolus to %1\$.1f U because of %2\$s")
|
`when`(rh.gs(R.string.limitingbolus)).thenReturn("Limiting bolus to %1\$.1f U because of %2\$s")
|
||||||
`when`(rh.gs(R.string.limitingbasalratio)).thenReturn("Limiting max basal rate to %1\$.2f U/h because of %2\$s")
|
`when`(rh.gs(R.string.limitingbasalratio)).thenReturn("Limiting max basal rate to %1\$.2f U/h because of %2\$s")
|
||||||
`when`(rh.gs(R.string.limitingiob)).thenReturn("Limiting IOB to %1\$.1f U because of %2\$s")
|
`when`(rh.gs(R.string.limiting_iob)).thenReturn("Limiting IOB to %1\$.1f U because of %2\$s")
|
||||||
`when`(rh.gs(R.string.limitingcarbs)).thenReturn("Limiting carbs to %1\$d g because of %2\$s")
|
`when`(rh.gs(R.string.limitingcarbs)).thenReturn("Limiting carbs to %1\$d g because of %2\$s")
|
||||||
`when`(rh.gs(R.string.limitingpercentrate)).thenReturn("Limiting max percent rate to %1\$d%% because of %2\$s")
|
`when`(rh.gs(R.string.limitingpercentrate)).thenReturn("Limiting max percent rate to %1\$d%% because of %2\$s")
|
||||||
`when`(rh.gs(R.string.pumpisnottempbasalcapable)).thenReturn("Pump is not temp basal capable")
|
`when`(rh.gs(R.string.pumpisnottempbasalcapable)).thenReturn("Pump is not temp basal capable")
|
||||||
|
|
|
@ -10,12 +10,6 @@ import kotlin.math.max
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
val PumpSync.PumpState.TemporaryBasal.end: Long
|
|
||||||
get() = timestamp + duration
|
|
||||||
|
|
||||||
val PumpSync.PumpState.TemporaryBasal.plannedRemainingMinutes: Long
|
|
||||||
get() = max(T.msecs(end - System.currentTimeMillis()).mins(), 0L)
|
|
||||||
|
|
||||||
val PumpSync.PumpState.TemporaryBasal.plannedRemainingMinutesRoundedUp: Int
|
val PumpSync.PumpState.TemporaryBasal.plannedRemainingMinutesRoundedUp: Int
|
||||||
get() = max(ceil((end - System.currentTimeMillis()) / 1000.0 / 60).toInt(), 0)
|
get() = max(ceil((end - System.currentTimeMillis()) / 1000.0 / 60).toInt(), 0)
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,10 @@
|
||||||
<string name="target_label">Doelwit</string>
|
<string name="target_label">Doelwit</string>
|
||||||
<string name="basal_long_label">Basale waarde</string>
|
<string name="basal_long_label">Basale waarde</string>
|
||||||
<string name="initializing">Inisialiseer tans...</string>
|
<string name="initializing">Inisialiseer tans...</string>
|
||||||
<string name="serialnumber">Reeksnommer</string>
|
<string name="serial_number">Reeksnommer</string>
|
||||||
<string name="battery_label">Battery</string>
|
<string name="battery_label">Battery</string>
|
||||||
<string name="lastconnection_label">Laaste verbinding</string>
|
<string name="last_connection_label">Laaste verbinding</string>
|
||||||
<string name="lastbolus_label">Laaste bolus</string>
|
<string name="last_bolus_label">Laaste bolus</string>
|
||||||
<string name="dailyunits">Daaglikse eenhede</string>
|
<string name="dailyunits">Daaglikse eenhede</string>
|
||||||
<string name="base_basal_rate_label">Basis basale tempo</string>
|
<string name="base_basal_rate_label">Basis basale tempo</string>
|
||||||
<string name="tempbasal_label">Tydelike basaal</string>
|
<string name="tempbasal_label">Tydelike basaal</string>
|
||||||
|
|
|
@ -38,10 +38,10 @@
|
||||||
<string name="target_label">Целeва КЗ:</string>
|
<string name="target_label">Целeва КЗ:</string>
|
||||||
<string name="basal_long_label">Базал</string>
|
<string name="basal_long_label">Базал</string>
|
||||||
<string name="initializing">Инициализация ...</string>
|
<string name="initializing">Инициализация ...</string>
|
||||||
<string name="serialnumber">Сериен номер</string>
|
<string name="serial_number">Сериен номер</string>
|
||||||
<string name="battery_label">Батерия</string>
|
<string name="battery_label">Батерия</string>
|
||||||
<string name="lastconnection_label">Последна връзка</string>
|
<string name="last_connection_label">Последна връзка</string>
|
||||||
<string name="lastbolus_label">Последен болус:</string>
|
<string name="last_bolus_label">Последен болус:</string>
|
||||||
<string name="dailyunits">Инсулин за деня</string>
|
<string name="dailyunits">Инсулин за деня</string>
|
||||||
<string name="base_basal_rate_label">Базова базална стойност</string>
|
<string name="base_basal_rate_label">Базова базална стойност</string>
|
||||||
<string name="tempbasal_label">Временен базал</string>
|
<string name="tempbasal_label">Временен базал</string>
|
||||||
|
|
|
@ -38,10 +38,10 @@
|
||||||
<string name="target_label">Objectiu</string>
|
<string name="target_label">Objectiu</string>
|
||||||
<string name="basal_long_label">Ràtio de basal</string>
|
<string name="basal_long_label">Ràtio de basal</string>
|
||||||
<string name="initializing">Inicialitzant...</string>
|
<string name="initializing">Inicialitzant...</string>
|
||||||
<string name="serialnumber">Nr. de sèrie</string>
|
<string name="serial_number">Nr. de sèrie</string>
|
||||||
<string name="battery_label">Bateria</string>
|
<string name="battery_label">Bateria</string>
|
||||||
<string name="lastconnection_label">Última connexió</string>
|
<string name="last_connection_label">Última connexió</string>
|
||||||
<string name="lastbolus_label">Darrer bolus</string>
|
<string name="last_bolus_label">Darrer bolus</string>
|
||||||
<string name="dailyunits">Unitats diàries</string>
|
<string name="dailyunits">Unitats diàries</string>
|
||||||
<string name="base_basal_rate_label">Ràtio de basal base</string>
|
<string name="base_basal_rate_label">Ràtio de basal base</string>
|
||||||
<string name="tempbasal_label">Basal temporal</string>
|
<string name="tempbasal_label">Basal temporal</string>
|
||||||
|
|
|
@ -45,10 +45,10 @@
|
||||||
<string name="basal_long_label">Bazál</string>
|
<string name="basal_long_label">Bazál</string>
|
||||||
<string name="target_long_label">Cílová glykémie</string>
|
<string name="target_long_label">Cílová glykémie</string>
|
||||||
<string name="initializing">Inicializuji ...</string>
|
<string name="initializing">Inicializuji ...</string>
|
||||||
<string name="serialnumber">Sériové číslo</string>
|
<string name="serial_number">Sériové číslo</string>
|
||||||
<string name="battery_label">Baterie</string>
|
<string name="battery_label">Baterie</string>
|
||||||
<string name="lastconnection_label">Poslední spojení</string>
|
<string name="last_connection_label">Poslední spojení</string>
|
||||||
<string name="lastbolus_label">Poslední bolus</string>
|
<string name="last_bolus_label">Poslední bolus</string>
|
||||||
<string name="dailyunits">Jednotek za den</string>
|
<string name="dailyunits">Jednotek za den</string>
|
||||||
<string name="base_basal_rate_label">Základní hodnota bazálu</string>
|
<string name="base_basal_rate_label">Základní hodnota bazálu</string>
|
||||||
<string name="tempbasal_label">Dočasný bazál</string>
|
<string name="tempbasal_label">Dočasný bazál</string>
|
||||||
|
|
|
@ -43,10 +43,10 @@
|
||||||
<string name="basal_long_label">Basalrate</string>
|
<string name="basal_long_label">Basalrate</string>
|
||||||
<string name="target_long_label">Blodsukker mål</string>
|
<string name="target_long_label">Blodsukker mål</string>
|
||||||
<string name="initializing">Initialiserer ...</string>
|
<string name="initializing">Initialiserer ...</string>
|
||||||
<string name="serialnumber">Serienummer</string>
|
<string name="serial_number">Serienummer</string>
|
||||||
<string name="battery_label">Batteri</string>
|
<string name="battery_label">Batteri</string>
|
||||||
<string name="lastconnection_label">Seneste forbindelse</string>
|
<string name="last_connection_label">Seneste forbindelse</string>
|
||||||
<string name="lastbolus_label">Seneste Bolus</string>
|
<string name="last_bolus_label">Seneste Bolus</string>
|
||||||
<string name="dailyunits">Daglige enheder</string>
|
<string name="dailyunits">Daglige enheder</string>
|
||||||
<string name="base_basal_rate_label">Standard basal rate</string>
|
<string name="base_basal_rate_label">Standard basal rate</string>
|
||||||
<string name="tempbasal_label">Midlertidig basal</string>
|
<string name="tempbasal_label">Midlertidig basal</string>
|
||||||
|
|
|
@ -42,10 +42,10 @@
|
||||||
<string name="basal_long_label">Basalrate</string>
|
<string name="basal_long_label">Basalrate</string>
|
||||||
<string name="target_long_label">BZ Ziel</string>
|
<string name="target_long_label">BZ Ziel</string>
|
||||||
<string name="initializing">Initialisierung...</string>
|
<string name="initializing">Initialisierung...</string>
|
||||||
<string name="serialnumber">Seriennummer</string>
|
<string name="serial_number">Seriennummer</string>
|
||||||
<string name="battery_label">Batterie</string>
|
<string name="battery_label">Batterie</string>
|
||||||
<string name="lastconnection_label">Letzte Verbindung</string>
|
<string name="last_connection_label">Letzte Verbindung</string>
|
||||||
<string name="lastbolus_label">Letzter Bolus</string>
|
<string name="last_bolus_label">Letzter Bolus</string>
|
||||||
<string name="dailyunits">Tägliche Einheiten</string>
|
<string name="dailyunits">Tägliche Einheiten</string>
|
||||||
<string name="base_basal_rate_label">Basis-Basalrate</string>
|
<string name="base_basal_rate_label">Basis-Basalrate</string>
|
||||||
<string name="tempbasal_label">TBR</string>
|
<string name="tempbasal_label">TBR</string>
|
||||||
|
|
|
@ -34,10 +34,10 @@
|
||||||
<string name="target_label">Στόχος</string>
|
<string name="target_label">Στόχος</string>
|
||||||
<string name="basal_long_label">Βασικός Ρυθμός</string>
|
<string name="basal_long_label">Βασικός Ρυθμός</string>
|
||||||
<string name="initializing">Παραμετροποίηση...</string>
|
<string name="initializing">Παραμετροποίηση...</string>
|
||||||
<string name="serialnumber">Serial number</string>
|
<string name="serial_number">Serial number</string>
|
||||||
<string name="battery_label">Μπαταρία</string>
|
<string name="battery_label">Μπαταρία</string>
|
||||||
<string name="lastconnection_label">Τελευταία σύνδεση</string>
|
<string name="last_connection_label">Τελευταία σύνδεση</string>
|
||||||
<string name="lastbolus_label">Τελευταίο Bolus:</string>
|
<string name="last_bolus_label">Τελευταίο Bolus:</string>
|
||||||
<string name="dailyunits">Μονάδες ανά ημέρα </string>
|
<string name="dailyunits">Μονάδες ανά ημέρα </string>
|
||||||
<string name="base_basal_rate_label">Βάση Βασικού Ρυθμού</string>
|
<string name="base_basal_rate_label">Βάση Βασικού Ρυθμού</string>
|
||||||
<string name="tempbasal_label">Προσωρινός Ρυθμός</string>
|
<string name="tempbasal_label">Προσωρινός Ρυθμός</string>
|
||||||
|
|
|
@ -45,10 +45,10 @@
|
||||||
<string name="basal_long_label">Tasa basal</string>
|
<string name="basal_long_label">Tasa basal</string>
|
||||||
<string name="target_long_label">Objetivo de glucosa en sangre</string>
|
<string name="target_long_label">Objetivo de glucosa en sangre</string>
|
||||||
<string name="initializing">Iniciando...</string>
|
<string name="initializing">Iniciando...</string>
|
||||||
<string name="serialnumber">Número de serie</string>
|
<string name="serial_number">Número de serie</string>
|
||||||
<string name="battery_label">Batería</string>
|
<string name="battery_label">Batería</string>
|
||||||
<string name="lastconnection_label">Última conexión</string>
|
<string name="last_connection_label">Última conexión</string>
|
||||||
<string name="lastbolus_label">Último bolo</string>
|
<string name="last_bolus_label">Último bolo</string>
|
||||||
<string name="dailyunits">Unidades diarias</string>
|
<string name="dailyunits">Unidades diarias</string>
|
||||||
<string name="base_basal_rate_label">Dosis Basal Base</string>
|
<string name="base_basal_rate_label">Dosis Basal Base</string>
|
||||||
<string name="tempbasal_label">Basal temporal</string>
|
<string name="tempbasal_label">Basal temporal</string>
|
||||||
|
|
|
@ -45,10 +45,10 @@
|
||||||
<string name="basal_long_label">Débit de Basal</string>
|
<string name="basal_long_label">Débit de Basal</string>
|
||||||
<string name="target_long_label">Glycémie cible</string>
|
<string name="target_long_label">Glycémie cible</string>
|
||||||
<string name="initializing">En cours d\'initialisation...</string>
|
<string name="initializing">En cours d\'initialisation...</string>
|
||||||
<string name="serialnumber">Numéro de série</string>
|
<string name="serial_number">Numéro de série</string>
|
||||||
<string name="battery_label">Niveau batterie</string>
|
<string name="battery_label">Niveau batterie</string>
|
||||||
<string name="lastconnection_label">Dernière connexion</string>
|
<string name="last_connection_label">Dernière connexion</string>
|
||||||
<string name="lastbolus_label">Dernier bolus</string>
|
<string name="last_bolus_label">Dernier bolus</string>
|
||||||
<string name="dailyunits">Unités quotidiennes</string>
|
<string name="dailyunits">Unités quotidiennes</string>
|
||||||
<string name="base_basal_rate_label">Débit de Basal</string>
|
<string name="base_basal_rate_label">Débit de Basal</string>
|
||||||
<string name="tempbasal_label">Basal temporaire</string>
|
<string name="tempbasal_label">Basal temporaire</string>
|
||||||
|
|
|
@ -27,10 +27,10 @@
|
||||||
<string name="target_label">Cuspóir</string>
|
<string name="target_label">Cuspóir</string>
|
||||||
<string name="basal_long_label">Bunaidh ráta</string>
|
<string name="basal_long_label">Bunaidh ráta</string>
|
||||||
<string name="initializing">Tosaithe ...</string>
|
<string name="initializing">Tosaithe ...</string>
|
||||||
<string name="serialnumber">Sraithuimhir</string>
|
<string name="serial_number">Sraithuimhir</string>
|
||||||
<string name="battery_label">Ceallraí</string>
|
<string name="battery_label">Ceallraí</string>
|
||||||
<string name="lastconnection_label">Nasc deiridh</string>
|
<string name="last_connection_label">Nasc deiridh</string>
|
||||||
<string name="lastbolus_label">Bólas deiridh</string>
|
<string name="last_bolus_label">Bólas deiridh</string>
|
||||||
<string name="dailyunits">Aonaid lá</string>
|
<string name="dailyunits">Aonaid lá</string>
|
||||||
<string name="base_basal_rate_label">Bunaidh ráta bonn</string>
|
<string name="base_basal_rate_label">Bunaidh ráta bonn</string>
|
||||||
<string name="reservoir_label">Taiscumar</string>
|
<string name="reservoir_label">Taiscumar</string>
|
||||||
|
|
|
@ -43,10 +43,10 @@
|
||||||
<string name="basal_long_label">Bazalna stopa</string>
|
<string name="basal_long_label">Bazalna stopa</string>
|
||||||
<string name="target_long_label">Ciljana razina glukoze u krvi</string>
|
<string name="target_long_label">Ciljana razina glukoze u krvi</string>
|
||||||
<string name="initializing">Pokretanje...</string>
|
<string name="initializing">Pokretanje...</string>
|
||||||
<string name="serialnumber">Serijski broj</string>
|
<string name="serial_number">Serijski broj</string>
|
||||||
<string name="battery_label">Baterija</string>
|
<string name="battery_label">Baterija</string>
|
||||||
<string name="lastconnection_label">Zadnja uspostava veze</string>
|
<string name="last_connection_label">Zadnja uspostava veze</string>
|
||||||
<string name="lastbolus_label">Zadnji bolus</string>
|
<string name="last_bolus_label">Zadnji bolus</string>
|
||||||
<string name="shortgram">g</string>
|
<string name="shortgram">g</string>
|
||||||
<string name="pump_unreachable">Pumpa nedostupna</string>
|
<string name="pump_unreachable">Pumpa nedostupna</string>
|
||||||
<string name="exit">Izlaz</string>
|
<string name="exit">Izlaz</string>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<string name="target_label">Cél</string>
|
<string name="target_label">Cél</string>
|
||||||
<string name="basal_long_label">Bázisütem</string>
|
<string name="basal_long_label">Bázisütem</string>
|
||||||
<string name="initializing">Inicializálás ...</string>
|
<string name="initializing">Inicializálás ...</string>
|
||||||
<string name="serialnumber">Sorozatszám</string>
|
<string name="serial_number">Sorozatszám</string>
|
||||||
<string name="shortgram">g</string>
|
<string name="shortgram">g</string>
|
||||||
<string name="shortpercent">%</string>
|
<string name="shortpercent">%</string>
|
||||||
<string name="bluetooth">Bluetooth</string>
|
<string name="bluetooth">Bluetooth</string>
|
||||||
|
|
|
@ -43,10 +43,10 @@
|
||||||
<string name="basal_long_label">Velocità basale</string>
|
<string name="basal_long_label">Velocità basale</string>
|
||||||
<string name="target_long_label">Target glicemia</string>
|
<string name="target_long_label">Target glicemia</string>
|
||||||
<string name="initializing">Inizializzazione...</string>
|
<string name="initializing">Inizializzazione...</string>
|
||||||
<string name="serialnumber">Numero seriale</string>
|
<string name="serial_number">Numero seriale</string>
|
||||||
<string name="battery_label">Batteria</string>
|
<string name="battery_label">Batteria</string>
|
||||||
<string name="lastconnection_label">Ultima connessione</string>
|
<string name="last_connection_label">Ultima connessione</string>
|
||||||
<string name="lastbolus_label">Ultimo bolo</string>
|
<string name="last_bolus_label">Ultimo bolo</string>
|
||||||
<string name="dailyunits">Unità giornaliere</string>
|
<string name="dailyunits">Unità giornaliere</string>
|
||||||
<string name="base_basal_rate_label">Velocità basale originale</string>
|
<string name="base_basal_rate_label">Velocità basale originale</string>
|
||||||
<string name="tempbasal_label">Basale temporanea</string>
|
<string name="tempbasal_label">Basale temporanea</string>
|
||||||
|
|
|
@ -43,10 +43,10 @@
|
||||||
<string name="basal_long_label">מינון בזאלי</string>
|
<string name="basal_long_label">מינון בזאלי</string>
|
||||||
<string name="target_long_label">ערך מטרה</string>
|
<string name="target_long_label">ערך מטרה</string>
|
||||||
<string name="initializing">מאתחל...</string>
|
<string name="initializing">מאתחל...</string>
|
||||||
<string name="serialnumber">מספר סידורי</string>
|
<string name="serial_number">מספר סידורי</string>
|
||||||
<string name="battery_label">סוללה</string>
|
<string name="battery_label">סוללה</string>
|
||||||
<string name="lastconnection_label">התחברות אחרונה</string>
|
<string name="last_connection_label">התחברות אחרונה</string>
|
||||||
<string name="lastbolus_label">בולוס אחרון</string>
|
<string name="last_bolus_label">בולוס אחרון</string>
|
||||||
<string name="dailyunits">יחידות יומיות</string>
|
<string name="dailyunits">יחידות יומיות</string>
|
||||||
<string name="base_basal_rate_label">בזאלי בסיסי</string>
|
<string name="base_basal_rate_label">בזאלי בסיסי</string>
|
||||||
<string name="tempbasal_label">בזאלי זמני</string>
|
<string name="tempbasal_label">בזאלי זמני</string>
|
||||||
|
|
|
@ -38,10 +38,10 @@
|
||||||
<string name="target_label">목표:</string>
|
<string name="target_label">목표:</string>
|
||||||
<string name="basal_long_label">Basal양</string>
|
<string name="basal_long_label">Basal양</string>
|
||||||
<string name="initializing">초기화중 ...</string>
|
<string name="initializing">초기화중 ...</string>
|
||||||
<string name="serialnumber">시리얼번호</string>
|
<string name="serial_number">시리얼번호</string>
|
||||||
<string name="battery_label">배터리</string>
|
<string name="battery_label">배터리</string>
|
||||||
<string name="lastconnection_label">마지막 접속</string>
|
<string name="last_connection_label">마지막 접속</string>
|
||||||
<string name="lastbolus_label">최근 Bolus:</string>
|
<string name="last_bolus_label">최근 Bolus:</string>
|
||||||
<string name="dailyunits">일 인슐린 총량</string>
|
<string name="dailyunits">일 인슐린 총량</string>
|
||||||
<string name="base_basal_rate_label">기본 Basal양</string>
|
<string name="base_basal_rate_label">기본 Basal양</string>
|
||||||
<string name="tempbasal_label">임시Basal</string>
|
<string name="tempbasal_label">임시Basal</string>
|
||||||
|
|
|
@ -40,10 +40,10 @@
|
||||||
<string name="ic_long_label">Insulino į angliavandenius santykis</string>
|
<string name="ic_long_label">Insulino į angliavandenius santykis</string>
|
||||||
<string name="basal_long_label">Valandinė bazė</string>
|
<string name="basal_long_label">Valandinė bazė</string>
|
||||||
<string name="initializing">Inicijuojama ...</string>
|
<string name="initializing">Inicijuojama ...</string>
|
||||||
<string name="serialnumber">Serijos numeris</string>
|
<string name="serial_number">Serijos numeris</string>
|
||||||
<string name="battery_label">Baterija</string>
|
<string name="battery_label">Baterija</string>
|
||||||
<string name="lastconnection_label">Paskutinis prisijungimas</string>
|
<string name="last_connection_label">Paskutinis prisijungimas</string>
|
||||||
<string name="lastbolus_label">Paskutinis bolusas</string>
|
<string name="last_bolus_label">Paskutinis bolusas</string>
|
||||||
<string name="dailyunits">Paros insulinas</string>
|
<string name="dailyunits">Paros insulinas</string>
|
||||||
<string name="base_basal_rate_label">Pagrindinis bazės dydis</string>
|
<string name="base_basal_rate_label">Pagrindinis bazės dydis</string>
|
||||||
<string name="tempbasal_label">Laikina bazė</string>
|
<string name="tempbasal_label">Laikina bazė</string>
|
||||||
|
|
|
@ -45,10 +45,10 @@
|
||||||
<string name="basal_long_label">Basaalstand</string>
|
<string name="basal_long_label">Basaalstand</string>
|
||||||
<string name="target_long_label">Bloedglucose doelwaarde</string>
|
<string name="target_long_label">Bloedglucose doelwaarde</string>
|
||||||
<string name="initializing">Initialiseren...</string>
|
<string name="initializing">Initialiseren...</string>
|
||||||
<string name="serialnumber">Serie nummer</string>
|
<string name="serial_number">Serie nummer</string>
|
||||||
<string name="battery_label">Batterij</string>
|
<string name="battery_label">Batterij</string>
|
||||||
<string name="lastconnection_label">Laatste verbinding</string>
|
<string name="last_connection_label">Laatste verbinding</string>
|
||||||
<string name="lastbolus_label">Laatste bolus</string>
|
<string name="last_bolus_label">Laatste bolus</string>
|
||||||
<string name="dailyunits">Dag totaal</string>
|
<string name="dailyunits">Dag totaal</string>
|
||||||
<string name="base_basal_rate_label">Basis basaalstand</string>
|
<string name="base_basal_rate_label">Basis basaalstand</string>
|
||||||
<string name="tempbasal_label">Tijdelijk basaal</string>
|
<string name="tempbasal_label">Tijdelijk basaal</string>
|
||||||
|
|
|
@ -45,10 +45,10 @@
|
||||||
<string name="basal_long_label">Basalrate</string>
|
<string name="basal_long_label">Basalrate</string>
|
||||||
<string name="target_long_label">Blodsukkermål</string>
|
<string name="target_long_label">Blodsukkermål</string>
|
||||||
<string name="initializing">Starter opp...</string>
|
<string name="initializing">Starter opp...</string>
|
||||||
<string name="serialnumber">Serienummer</string>
|
<string name="serial_number">Serienummer</string>
|
||||||
<string name="battery_label">Batteri</string>
|
<string name="battery_label">Batteri</string>
|
||||||
<string name="lastconnection_label">Siste tilkobling</string>
|
<string name="last_connection_label">Siste tilkobling</string>
|
||||||
<string name="lastbolus_label">Siste bolus</string>
|
<string name="last_bolus_label">Siste bolus</string>
|
||||||
<string name="dailyunits">Daglige enheter</string>
|
<string name="dailyunits">Daglige enheter</string>
|
||||||
<string name="base_basal_rate_label">Profilens basaldose</string>
|
<string name="base_basal_rate_label">Profilens basaldose</string>
|
||||||
<string name="tempbasal_label">Temp basal</string>
|
<string name="tempbasal_label">Temp basal</string>
|
||||||
|
|
|
@ -38,10 +38,10 @@
|
||||||
<string name="target_label">Cel</string>
|
<string name="target_label">Cel</string>
|
||||||
<string name="basal_long_label">Dawka bazowa</string>
|
<string name="basal_long_label">Dawka bazowa</string>
|
||||||
<string name="initializing">Inicjuje ...</string>
|
<string name="initializing">Inicjuje ...</string>
|
||||||
<string name="serialnumber">Numer seryjny</string>
|
<string name="serial_number">Numer seryjny</string>
|
||||||
<string name="battery_label">Bateria</string>
|
<string name="battery_label">Bateria</string>
|
||||||
<string name="lastconnection_label">Ostatnie połączenie</string>
|
<string name="last_connection_label">Ostatnie połączenie</string>
|
||||||
<string name="lastbolus_label">Ostatni bolus</string>
|
<string name="last_bolus_label">Ostatni bolus</string>
|
||||||
<string name="dailyunits">Jednostki dzienne</string>
|
<string name="dailyunits">Jednostki dzienne</string>
|
||||||
<string name="base_basal_rate_label">Podstawowa dawka bazowa</string>
|
<string name="base_basal_rate_label">Podstawowa dawka bazowa</string>
|
||||||
<string name="tempbasal_label">Baza tymczasowa</string>
|
<string name="tempbasal_label">Baza tymczasowa</string>
|
||||||
|
|
|
@ -43,10 +43,10 @@
|
||||||
<string name="basal_long_label">Taxa basal</string>
|
<string name="basal_long_label">Taxa basal</string>
|
||||||
<string name="target_long_label">Alvo de glicemia</string>
|
<string name="target_long_label">Alvo de glicemia</string>
|
||||||
<string name="initializing">Inicializando...</string>
|
<string name="initializing">Inicializando...</string>
|
||||||
<string name="serialnumber">Número de série</string>
|
<string name="serial_number">Número de série</string>
|
||||||
<string name="battery_label">Bateria</string>
|
<string name="battery_label">Bateria</string>
|
||||||
<string name="lastconnection_label">Última ligação</string>
|
<string name="last_connection_label">Última ligação</string>
|
||||||
<string name="lastbolus_label">Último Bolus</string>
|
<string name="last_bolus_label">Último Bolus</string>
|
||||||
<string name="dailyunits">Unidades diárias</string>
|
<string name="dailyunits">Unidades diárias</string>
|
||||||
<string name="base_basal_rate_label">Taxa Basal de base</string>
|
<string name="base_basal_rate_label">Taxa Basal de base</string>
|
||||||
<string name="tempbasal_label">Basal temporaria</string>
|
<string name="tempbasal_label">Basal temporaria</string>
|
||||||
|
|
|
@ -38,10 +38,10 @@
|
||||||
<string name="target_label">Alvo</string>
|
<string name="target_label">Alvo</string>
|
||||||
<string name="basal_long_label">Taxa da Basal</string>
|
<string name="basal_long_label">Taxa da Basal</string>
|
||||||
<string name="initializing">A inicializar ...</string>
|
<string name="initializing">A inicializar ...</string>
|
||||||
<string name="serialnumber">Número de série</string>
|
<string name="serial_number">Número de série</string>
|
||||||
<string name="battery_label">Bateria</string>
|
<string name="battery_label">Bateria</string>
|
||||||
<string name="lastconnection_label">Última ligação</string>
|
<string name="last_connection_label">Última ligação</string>
|
||||||
<string name="lastbolus_label">Último bólus</string>
|
<string name="last_bolus_label">Último bólus</string>
|
||||||
<string name="dailyunits">Unidades diárias</string>
|
<string name="dailyunits">Unidades diárias</string>
|
||||||
<string name="base_basal_rate_label">Taxa Basal de base</string>
|
<string name="base_basal_rate_label">Taxa Basal de base</string>
|
||||||
<string name="tempbasal_label">Basal temp</string>
|
<string name="tempbasal_label">Basal temp</string>
|
||||||
|
|
|
@ -38,10 +38,10 @@
|
||||||
<string name="target_label">Țintă</string>
|
<string name="target_label">Țintă</string>
|
||||||
<string name="basal_long_label">Rată bazală</string>
|
<string name="basal_long_label">Rată bazală</string>
|
||||||
<string name="initializing">Inițializare...</string>
|
<string name="initializing">Inițializare...</string>
|
||||||
<string name="serialnumber">Număr serial</string>
|
<string name="serial_number">Număr serial</string>
|
||||||
<string name="battery_label">Baterie</string>
|
<string name="battery_label">Baterie</string>
|
||||||
<string name="lastconnection_label">Ultima conexiune</string>
|
<string name="last_connection_label">Ultima conexiune</string>
|
||||||
<string name="lastbolus_label">Ultimul bolus</string>
|
<string name="last_bolus_label">Ultimul bolus</string>
|
||||||
<string name="dailyunits">Unități zilnic</string>
|
<string name="dailyunits">Unități zilnic</string>
|
||||||
<string name="base_basal_rate_label">Rată bazală normală</string>
|
<string name="base_basal_rate_label">Rată bazală normală</string>
|
||||||
<string name="tempbasal_label">Bazală temporară</string>
|
<string name="tempbasal_label">Bazală temporară</string>
|
||||||
|
|
|
@ -45,10 +45,10 @@
|
||||||
<string name="basal_long_label">Базальная скорость</string>
|
<string name="basal_long_label">Базальная скорость</string>
|
||||||
<string name="target_long_label">Целевая ГК</string>
|
<string name="target_long_label">Целевая ГК</string>
|
||||||
<string name="initializing">инициализация...</string>
|
<string name="initializing">инициализация...</string>
|
||||||
<string name="serialnumber">Серийный номер</string>
|
<string name="serial_number">Серийный номер</string>
|
||||||
<string name="battery_label">батарея</string>
|
<string name="battery_label">батарея</string>
|
||||||
<string name="lastconnection_label">прошлое соединение</string>
|
<string name="last_connection_label">прошлое соединение</string>
|
||||||
<string name="lastbolus_label">предыдущий болюс</string>
|
<string name="last_bolus_label">предыдущий болюс</string>
|
||||||
<string name="dailyunits">суточные единицы</string>
|
<string name="dailyunits">суточные единицы</string>
|
||||||
<string name="base_basal_rate_label">базовая величина базала</string>
|
<string name="base_basal_rate_label">базовая величина базала</string>
|
||||||
<string name="tempbasal_label">врем базал</string>
|
<string name="tempbasal_label">врем базал</string>
|
||||||
|
|
|
@ -45,10 +45,10 @@
|
||||||
<string name="basal_long_label">Bazál</string>
|
<string name="basal_long_label">Bazál</string>
|
||||||
<string name="target_long_label">Cieľová glykémia</string>
|
<string name="target_long_label">Cieľová glykémia</string>
|
||||||
<string name="initializing">Inicializácia ...</string>
|
<string name="initializing">Inicializácia ...</string>
|
||||||
<string name="serialnumber">Sériové číslo</string>
|
<string name="serial_number">Sériové číslo</string>
|
||||||
<string name="battery_label">Batéria</string>
|
<string name="battery_label">Batéria</string>
|
||||||
<string name="lastconnection_label">Posledné spojenie</string>
|
<string name="last_connection_label">Posledné spojenie</string>
|
||||||
<string name="lastbolus_label">Posledný bolus</string>
|
<string name="last_bolus_label">Posledný bolus</string>
|
||||||
<string name="dailyunits">Jednotiek za deň</string>
|
<string name="dailyunits">Jednotiek za deň</string>
|
||||||
<string name="base_basal_rate_label">Základná hodnota bazálu</string>
|
<string name="base_basal_rate_label">Základná hodnota bazálu</string>
|
||||||
<string name="tempbasal_label">Dočasný bazál</string>
|
<string name="tempbasal_label">Dočasný bazál</string>
|
||||||
|
|
|
@ -42,10 +42,10 @@
|
||||||
<string name="basal_long_label">Basaldos</string>
|
<string name="basal_long_label">Basaldos</string>
|
||||||
<string name="target_long_label">Mål-BG</string>
|
<string name="target_long_label">Mål-BG</string>
|
||||||
<string name="initializing">Startar...</string>
|
<string name="initializing">Startar...</string>
|
||||||
<string name="serialnumber">Serienummer</string>
|
<string name="serial_number">Serienummer</string>
|
||||||
<string name="battery_label">Batterinivå</string>
|
<string name="battery_label">Batterinivå</string>
|
||||||
<string name="lastconnection_label">Senast ansluten</string>
|
<string name="last_connection_label">Senast ansluten</string>
|
||||||
<string name="lastbolus_label">Senaste bolus</string>
|
<string name="last_bolus_label">Senaste bolus</string>
|
||||||
<string name="dailyunits">Enheter per dag</string>
|
<string name="dailyunits">Enheter per dag</string>
|
||||||
<string name="base_basal_rate_label">Profilens basaldos</string>
|
<string name="base_basal_rate_label">Profilens basaldos</string>
|
||||||
<string name="tempbasal_label">Temp basal</string>
|
<string name="tempbasal_label">Temp basal</string>
|
||||||
|
|
|
@ -45,10 +45,10 @@
|
||||||
<string name="basal_long_label">Bazal oranı</string>
|
<string name="basal_long_label">Bazal oranı</string>
|
||||||
<string name="target_long_label">Kan Şekeri Hedefi</string>
|
<string name="target_long_label">Kan Şekeri Hedefi</string>
|
||||||
<string name="initializing">Başlatılıyor ...</string>
|
<string name="initializing">Başlatılıyor ...</string>
|
||||||
<string name="serialnumber">Seri numarası</string>
|
<string name="serial_number">Seri numarası</string>
|
||||||
<string name="battery_label">Pil</string>
|
<string name="battery_label">Pil</string>
|
||||||
<string name="lastconnection_label">Son bağlantı</string>
|
<string name="last_connection_label">Son bağlantı</string>
|
||||||
<string name="lastbolus_label">Son bolus</string>
|
<string name="last_bolus_label">Son bolus</string>
|
||||||
<string name="dailyunits">Günlük ünite</string>
|
<string name="dailyunits">Günlük ünite</string>
|
||||||
<string name="base_basal_rate_label">Temel bazal oranı</string>
|
<string name="base_basal_rate_label">Temel bazal oranı</string>
|
||||||
<string name="tempbasal_label">Geçici Bazal</string>
|
<string name="tempbasal_label">Geçici Bazal</string>
|
||||||
|
|
|
@ -42,10 +42,10 @@
|
||||||
<string name="basal_long_label">基础率</string>
|
<string name="basal_long_label">基础率</string>
|
||||||
<string name="target_long_label">血糖目标</string>
|
<string name="target_long_label">血糖目标</string>
|
||||||
<string name="initializing">正在初始化</string>
|
<string name="initializing">正在初始化</string>
|
||||||
<string name="serialnumber">序列号</string>
|
<string name="serial_number">序列号</string>
|
||||||
<string name="battery_label">电池</string>
|
<string name="battery_label">电池</string>
|
||||||
<string name="lastconnection_label">上次连接</string>
|
<string name="last_connection_label">上次连接</string>
|
||||||
<string name="lastbolus_label">上次大剂量</string>
|
<string name="last_bolus_label">上次大剂量</string>
|
||||||
<string name="dailyunits">每日单位数</string>
|
<string name="dailyunits">每日单位数</string>
|
||||||
<string name="base_basal_rate_label">基础率</string>
|
<string name="base_basal_rate_label">基础率</string>
|
||||||
<string name="tempbasal_label">临时基础率</string>
|
<string name="tempbasal_label">临时基础率</string>
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- General-->
|
<!-- General-->
|
||||||
<string name="refresh">Refresh</string>
|
|
||||||
<string name="save">Save</string>
|
<string name="save">Save</string>
|
||||||
<string name="not_set_short">Not set</string>
|
<string name="not_set_short">Not set</string>
|
||||||
<string name="failedupdatebasalprofile">Failed to update basal profile</string>
|
|
||||||
<string name="tempbasaldeliveryerror">Tempbasal delivery error</string>
|
<string name="tempbasaldeliveryerror">Tempbasal delivery error</string>
|
||||||
<string name="goingtodeliver">Going to deliver %1$.2f U</string>
|
<string name="goingtodeliver">Going to deliver %1$.2f U</string>
|
||||||
<string name="waitingforpump">Waiting for pump</string>
|
<string name="waitingforpump">Waiting for pump</string>
|
||||||
|
@ -14,7 +12,6 @@
|
||||||
<string name="formatsignedinsulinunits">%1$+.2f U</string>
|
<string name="formatsignedinsulinunits">%1$+.2f U</string>
|
||||||
<string name="format_carbs">%1$d g</string>
|
<string name="format_carbs">%1$d g</string>
|
||||||
<string name="reservoirvalue">%1$.0f / %2$d U</string>
|
<string name="reservoirvalue">%1$.0f / %2$d U</string>
|
||||||
<string name="pump_basebasalrate">%1$.2f U/h</string>
|
|
||||||
<string name="format_hours">%1$.2f h</string>
|
<string name="format_hours">%1$.2f h</string>
|
||||||
<string name="format_mins">%1$d mins</string>
|
<string name="format_mins">%1$d mins</string>
|
||||||
<string name="pumpbusy">Pump is busy</string>
|
<string name="pumpbusy">Pump is busy</string>
|
||||||
|
@ -41,15 +38,7 @@
|
||||||
<string name="basal_long_label">Basal rate</string>
|
<string name="basal_long_label">Basal rate</string>
|
||||||
<string name="target_long_label">Blood Glucose Target</string>
|
<string name="target_long_label">Blood Glucose Target</string>
|
||||||
<string name="initializing">Initializing ...</string>
|
<string name="initializing">Initializing ...</string>
|
||||||
<string name="serialnumber">Serial number</string>
|
|
||||||
<string name="battery_label">Battery</string>
|
|
||||||
<string name="lastconnection_label">Last connection</string>
|
|
||||||
<string name="lastbolus_label">Last bolus</string>
|
|
||||||
<string name="dailyunits">Daily units</string>
|
<string name="dailyunits">Daily units</string>
|
||||||
<string name="base_basal_rate_label">Base basal rate</string>
|
|
||||||
<string name="tempbasal_label">Temp basal</string>
|
|
||||||
<string name="extended_bolus_label">Extended bolus</string>
|
|
||||||
<string name="reservoir_label">Reservoir</string>
|
|
||||||
<string name="pumphistory">Pump history</string>
|
<string name="pumphistory">Pump history</string>
|
||||||
<string name="viewprofile">View profile</string>
|
<string name="viewprofile">View profile</string>
|
||||||
<string name="eventtype">Event type</string>
|
<string name="eventtype">Event type</string>
|
||||||
|
@ -62,13 +51,7 @@
|
||||||
<string name="btwatchdog_title">BT Watchdog</string>
|
<string name="btwatchdog_title">BT Watchdog</string>
|
||||||
<string name="btwatchdog_summary">Switches off the phone\'s bluetooth for one second if no connection to the pump is possible. This may help on some phones where the bluetooth stack freezes.</string>
|
<string name="btwatchdog_summary">Switches off the phone\'s bluetooth for one second if no connection to the pump is possible. This may help on some phones where the bluetooth stack freezes.</string>
|
||||||
<string name="pairing">Pairing</string>
|
<string name="pairing">Pairing</string>
|
||||||
<string name="loopdisabled">LOOP DISABLED BY CONSTRAINTS</string>
|
|
||||||
<string name="bolusdelivered">Bolus %1$.2f U delivered successfully</string>
|
|
||||||
<string name="virtualpump_resultok">OK</string>
|
<string name="virtualpump_resultok">OK</string>
|
||||||
<string name="novalidbasalrate">No valid basal rate read from pump</string>
|
|
||||||
<string name="limitingmaxiob">Limiting max IOB to %1$.1f U because of %2$s</string>
|
|
||||||
<string name="unsafeusage">unsafe usage</string>
|
|
||||||
<string name="pump_unreachable">Pump unreachable</string>
|
|
||||||
<string name="extended_bolus">Extended bolus</string>
|
<string name="extended_bolus">Extended bolus</string>
|
||||||
<string name="pump_time_updated">Pump time updated</string>
|
<string name="pump_time_updated">Pump time updated</string>
|
||||||
<string name="exit">Exit</string>
|
<string name="exit">Exit</string>
|
||||||
|
@ -161,7 +144,6 @@
|
||||||
<string name="limitingpercentrate">Limiting max percent rate to %1$d%% because of %2$s</string>
|
<string name="limitingpercentrate">Limiting max percent rate to %1$d%% because of %2$s</string>
|
||||||
<string name="itmustbepositivevalue">it must be positive value</string>
|
<string name="itmustbepositivevalue">it must be positive value</string>
|
||||||
<string name="limitingbolus">Limiting bolus to %1$.1f U because of %2$s</string>
|
<string name="limitingbolus">Limiting bolus to %1$.1f U because of %2$s</string>
|
||||||
<string name="pumpNotInitializedProfileNotSet">Pump not initialized, profile not set!</string>
|
|
||||||
|
|
||||||
<!-- BlePreCheck-->
|
<!-- BlePreCheck-->
|
||||||
<string name="ble_not_supported">Bluetooth Low Energy not supported.</string>
|
<string name="ble_not_supported">Bluetooth Low Energy not supported.</string>
|
||||||
|
@ -260,7 +242,6 @@
|
||||||
<string name="percent">Percent</string>
|
<string name="percent">Percent</string>
|
||||||
<string name="absolute">Absolute</string>
|
<string name="absolute">Absolute</string>
|
||||||
<string name="configbuilder_insulin">Insulin</string>
|
<string name="configbuilder_insulin">Insulin</string>
|
||||||
<string name="insulin_unit_shortname">U</string>
|
|
||||||
<string name="waitingforpumpresult">Waiting for result</string>
|
<string name="waitingforpumpresult">Waiting for result</string>
|
||||||
<string name="smb_shortname">SMB</string>
|
<string name="smb_shortname">SMB</string>
|
||||||
|
|
||||||
|
@ -464,7 +445,6 @@
|
||||||
<string name="scheduled_status_refresh" comment="26 characters max for translation">Scheduled Status Refresh</string>
|
<string name="scheduled_status_refresh" comment="26 characters max for translation">Scheduled Status Refresh</string>
|
||||||
<string name="unconfirmed_command" comment="26 characters max for translation">Unconfirmed command</string>
|
<string name="unconfirmed_command" comment="26 characters max for translation">Unconfirmed command</string>
|
||||||
<string name="requested_by_user" comment="26 characters max for translation">Requested by user</string>
|
<string name="requested_by_user" comment="26 characters max for translation">Requested by user</string>
|
||||||
<string name="user_request" comment="26 characters max for translation">User request</string>
|
|
||||||
<string name="bolus_ok" comment="26 characters max for translation">Bolus OK</string>
|
<string name="bolus_ok" comment="26 characters max for translation">Bolus OK</string>
|
||||||
<string name="pump_paired" comment="26 characters max for translation">Pump paired</string>
|
<string name="pump_paired" comment="26 characters max for translation">Pump paired</string>
|
||||||
<string name="insight_refresh_button" comment="26 characters max for translation">Insight Refresh Button</string>
|
<string name="insight_refresh_button" comment="26 characters max for translation">Insight Refresh Button</string>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- General-->
|
<!-- General-->
|
||||||
|
<string name="refresh">Refresh</string>
|
||||||
<string name="error">Error</string>
|
<string name="error">Error</string>
|
||||||
<string name="profile_set_ok">Basal profile in pump updated</string>
|
<string name="profile_set_ok">Basal profile in pump updated</string>
|
||||||
<string name="invalid_input">Invalid input data</string>
|
<string name="invalid_input">Invalid input data</string>
|
||||||
|
@ -8,6 +9,25 @@
|
||||||
<string name="constraint_applied">Constraint applied!</string>
|
<string name="constraint_applied">Constraint applied!</string>
|
||||||
<string name="tempbasals_iobtotal_label_string">Total IOB:</string>
|
<string name="tempbasals_iobtotal_label_string">Total IOB:</string>
|
||||||
<string name="tt_label">TT</string>
|
<string name="tt_label">TT</string>
|
||||||
|
<string name="pump_unreachable">Pump unreachable</string>
|
||||||
|
<string name="insulin_unit_shortname">U</string>
|
||||||
|
<string name="pump_base_basal_rate">%1$.2f U/h</string>
|
||||||
|
<string name="pump_not_initialized_profile_not_set">Pump not initialized, profile not set!</string>
|
||||||
|
<string name="failed_update_basal_profile">Failed to update basal profile</string>
|
||||||
|
<string name="bolus_delivered">Bolus %1$.2f U delivered successfully</string>
|
||||||
|
<string name="no_valid_basal_rate">No valid basal rate read from pump</string>
|
||||||
|
<string name="limiting_iob">Limiting IOB to %1$.1f U because of %2$s</string>
|
||||||
|
<string name="loop_disabled">LOOP DISABLED BY CONSTRAINTS</string>
|
||||||
|
|
||||||
|
<!-- PumpFragments-->
|
||||||
|
<string name="battery_label">Battery</string>
|
||||||
|
<string name="reservoir_label">Reservoir</string>
|
||||||
|
<string name="last_connection_label">Last connection</string>
|
||||||
|
<string name="last_bolus_label">Last bolus</string>
|
||||||
|
<string name="base_basal_rate_label">Base basal rate</string>
|
||||||
|
<string name="tempbasal_label">Temp basal</string>
|
||||||
|
<string name="extended_bolus_label">Extended bolus</string>
|
||||||
|
<string name="serial_number">Serial number</string>
|
||||||
|
|
||||||
<!-- Locale -->
|
<!-- Locale -->
|
||||||
<string name="key_language" translatable="false">language</string>
|
<string name="key_language" translatable="false">language</string>
|
||||||
|
@ -37,4 +57,7 @@
|
||||||
<!-- BluetoothDevicePreference -->
|
<!-- BluetoothDevicePreference -->
|
||||||
<string name="needconnectpermission">Application needs bluetooth permission</string>
|
<string name="needconnectpermission">Application needs bluetooth permission</string>
|
||||||
|
|
||||||
|
<!-- Combo-->
|
||||||
|
<string name="user_request" comment="26 characters max for translation">User request</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
|
@ -166,16 +166,16 @@ class OverviewDataImpl @Inject constructor(
|
||||||
var temporaryBasal = iobCobCalculator.getTempBasalIncludingConvertedExtended(dateUtil.now())
|
var temporaryBasal = iobCobCalculator.getTempBasalIncludingConvertedExtended(dateUtil.now())
|
||||||
if (temporaryBasal?.isInProgress == false) temporaryBasal = null
|
if (temporaryBasal?.isInProgress == false) temporaryBasal = null
|
||||||
temporaryBasal?.let { "T:" + it.toStringShort() }
|
temporaryBasal?.let { "T:" + it.toStringShort() }
|
||||||
?: rh.gs(R.string.pump_basebasalrate, profile.getBasal())
|
?: rh.gs(R.string.pump_base_basal_rate, profile.getBasal())
|
||||||
} ?: rh.gs(R.string.value_unavailable_short)
|
} ?: rh.gs(R.string.value_unavailable_short)
|
||||||
|
|
||||||
override fun temporaryBasalDialogText(iobCobCalculator: IobCobCalculator): String =
|
override fun temporaryBasalDialogText(iobCobCalculator: IobCobCalculator): String =
|
||||||
profileFunction.getProfile()?.let { profile ->
|
profileFunction.getProfile()?.let { profile ->
|
||||||
iobCobCalculator.getTempBasalIncludingConvertedExtended(dateUtil.now())?.let { temporaryBasal ->
|
iobCobCalculator.getTempBasalIncludingConvertedExtended(dateUtil.now())?.let { temporaryBasal ->
|
||||||
"${rh.gs(R.string.base_basal_rate_label)}: ${rh.gs(R.string.pump_basebasalrate, profile.getBasal())}" +
|
"${rh.gs(R.string.base_basal_rate_label)}: ${rh.gs(R.string.pump_base_basal_rate, profile.getBasal())}" +
|
||||||
"\n" + rh.gs(R.string.tempbasal_label) + ": " + temporaryBasal.toStringFull(profile, dateUtil)
|
"\n" + rh.gs(R.string.tempbasal_label) + ": " + temporaryBasal.toStringFull(profile, dateUtil)
|
||||||
}
|
}
|
||||||
?: "${rh.gs(R.string.base_basal_rate_label)}: ${rh.gs(R.string.pump_basebasalrate, profile.getBasal())}"
|
?: "${rh.gs(R.string.base_basal_rate_label)}: ${rh.gs(R.string.pump_base_basal_rate, profile.getBasal())}"
|
||||||
} ?: rh.gs(R.string.value_unavailable_short)
|
} ?: rh.gs(R.string.value_unavailable_short)
|
||||||
|
|
||||||
@DrawableRes override fun temporaryBasalIcon(iobCobCalculator: IobCobCalculator): Int =
|
@DrawableRes override fun temporaryBasalIcon(iobCobCalculator: IobCobCalculator): Int =
|
||||||
|
@ -205,7 +205,7 @@ class OverviewDataImpl @Inject constructor(
|
||||||
override fun extendedBolusText(iobCobCalculator: IobCobCalculator): String =
|
override fun extendedBolusText(iobCobCalculator: IobCobCalculator): String =
|
||||||
iobCobCalculator.getExtendedBolus(dateUtil.now())?.let { extendedBolus ->
|
iobCobCalculator.getExtendedBolus(dateUtil.now())?.let { extendedBolus ->
|
||||||
if (!extendedBolus.isInProgress(dateUtil)) ""
|
if (!extendedBolus.isInProgress(dateUtil)) ""
|
||||||
else if (!activePlugin.activePump.isFakingTempsByExtendedBoluses) rh.gs(R.string.pump_basebasalrate, extendedBolus.rate)
|
else if (!activePlugin.activePump.isFakingTempsByExtendedBoluses) rh.gs(R.string.pump_base_basal_rate, extendedBolus.rate)
|
||||||
else ""
|
else ""
|
||||||
} ?: ""
|
} ?: ""
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ class CommandQueueImplementation @Inject constructor(
|
||||||
setProfile(ProfileSealed.PS(it), it.interfaceIDs.nightscoutId != null, object : Callback() {
|
setProfile(ProfileSealed.PS(it), it.interfaceIDs.nightscoutId != null, object : Callback() {
|
||||||
override fun run() {
|
override fun run() {
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
activityNames.runAlarm(context, result.comment, rh.gs(R.string.failedupdatebasalprofile), R.raw.boluserror)
|
activityNames.runAlarm(context, result.comment, rh.gs(R.string.failed_update_basal_profile), R.raw.boluserror)
|
||||||
} else {
|
} else {
|
||||||
val nonCustomized = ProfileSealed.PS(it).convertToNonCustomizedProfile(dateUtil)
|
val nonCustomized = ProfileSealed.PS(it).convertToNonCustomizedProfile(dateUtil)
|
||||||
EffectiveProfileSwitch(
|
EffectiveProfileSwitch(
|
||||||
|
|
|
@ -508,17 +508,17 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Insight,
|
||||||
}
|
}
|
||||||
} catch (AppLayerErrorException e) {
|
} catch (AppLayerErrorException e) {
|
||||||
aapsLogger.info(LTag.PUMP, "Exception while setting profile: " + e.getClass().getCanonicalName() + " (" + e.getErrorCode() + ")");
|
aapsLogger.info(LTag.PUMP, "Exception while setting profile: " + e.getClass().getCanonicalName() + " (" + e.getErrorCode() + ")");
|
||||||
Notification notification = new Notification(Notification.FAILED_UPDATE_PROFILE, rh.gs(R.string.failedupdatebasalprofile), Notification.URGENT);
|
Notification notification = new Notification(Notification.FAILED_UPDATE_PROFILE, rh.gs(R.string.failed_update_basal_profile), Notification.URGENT);
|
||||||
rxBus.send(new EventNewNotification(notification));
|
rxBus.send(new EventNewNotification(notification));
|
||||||
result.comment(ExceptionTranslator.getString(context, e));
|
result.comment(ExceptionTranslator.getString(context, e));
|
||||||
} catch (InsightException e) {
|
} catch (InsightException e) {
|
||||||
aapsLogger.info(LTag.PUMP, "Exception while setting profile: " + e.getClass().getCanonicalName());
|
aapsLogger.info(LTag.PUMP, "Exception while setting profile: " + e.getClass().getCanonicalName());
|
||||||
Notification notification = new Notification(Notification.FAILED_UPDATE_PROFILE, rh.gs(R.string.failedupdatebasalprofile), Notification.URGENT);
|
Notification notification = new Notification(Notification.FAILED_UPDATE_PROFILE, rh.gs(R.string.failed_update_basal_profile), Notification.URGENT);
|
||||||
rxBus.send(new EventNewNotification(notification));
|
rxBus.send(new EventNewNotification(notification));
|
||||||
result.comment(ExceptionTranslator.getString(context, e));
|
result.comment(ExceptionTranslator.getString(context, e));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
aapsLogger.error("Exception while setting profile", e);
|
aapsLogger.error("Exception while setting profile", e);
|
||||||
Notification notification = new Notification(Notification.FAILED_UPDATE_PROFILE, rh.gs(R.string.failedupdatebasalprofile), Notification.URGENT);
|
Notification notification = new Notification(Notification.FAILED_UPDATE_PROFILE, rh.gs(R.string.failed_update_basal_profile), Notification.URGENT);
|
||||||
rxBus.send(new EventNewNotification(notification));
|
rxBus.send(new EventNewNotification(notification));
|
||||||
result.comment(ExceptionTranslator.getString(context, e));
|
result.comment(ExceptionTranslator.getString(context, e));
|
||||||
}
|
}
|
||||||
|
@ -968,7 +968,7 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Insight,
|
||||||
if (tb != null) {
|
if (tb != null) {
|
||||||
extended.put("TempBasalAbsoluteRate", convertedToAbsolute(tb, now, profile));
|
extended.put("TempBasalAbsoluteRate", convertedToAbsolute(tb, now, profile));
|
||||||
extended.put("TempBasalStart", dateUtil.dateAndTimeString(tb.getTimestamp()));
|
extended.put("TempBasalStart", dateUtil.dateAndTimeString(tb.getTimestamp()));
|
||||||
extended.put("TempBasalRemaining", getPlannedRemainingMinutes(tb));
|
extended.put("TempBasalRemaining", tb.getPlannedRemainingMinutes());
|
||||||
}
|
}
|
||||||
PumpSync.PumpState.ExtendedBolus eb = pumpSync.expectedPumpState().getExtendedBolus();
|
PumpSync.PumpState.ExtendedBolus eb = pumpSync.expectedPumpState().getExtendedBolus();
|
||||||
if (eb != null) {
|
if (eb != null) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:text="@string/serialnumber" />
|
android:text="@string/serial_number" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/serial_number"
|
android:id="@+id/serial_number"
|
||||||
|
|
|
@ -3,6 +3,8 @@ package info.nightscout.interfaces.pump
|
||||||
import info.nightscout.database.entities.TemporaryBasal
|
import info.nightscout.database.entities.TemporaryBasal
|
||||||
import info.nightscout.interfaces.profile.Profile
|
import info.nightscout.interfaces.profile.Profile
|
||||||
import info.nightscout.interfaces.pump.defs.PumpType
|
import info.nightscout.interfaces.pump.defs.PumpType
|
||||||
|
import info.nightscout.shared.utils.T
|
||||||
|
import kotlin.math.max
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This interface allows pump drivers to push data changes (creation and update of treatments, temporary basals and extended boluses) back to AAPS-core.
|
* This interface allows pump drivers to push data changes (creation and update of treatments, temporary basals and extended boluses) back to AAPS-core.
|
||||||
|
@ -77,7 +79,11 @@ interface PumpSync {
|
||||||
// used only to cancel TBR on pump change
|
// used only to cancel TBR on pump change
|
||||||
val pumpType: PumpType = PumpType.USER,
|
val pumpType: PumpType = PumpType.USER,
|
||||||
val pumpSerial: String = ""
|
val pumpSerial: String = ""
|
||||||
)
|
) {
|
||||||
|
|
||||||
|
val end: Long get() = timestamp + duration
|
||||||
|
val plannedRemainingMinutes: Long get() = max(T.msecs(end - System.currentTimeMillis()).mins(), 0L)
|
||||||
|
}
|
||||||
|
|
||||||
data class ExtendedBolus @JvmOverloads constructor(
|
data class ExtendedBolus @JvmOverloads constructor(
|
||||||
val timestamp: Long,
|
val timestamp: Long,
|
||||||
|
|
|
@ -53,4 +53,9 @@ interface ActivityNames {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun runCareDialog(fragmentManager: FragmentManager, options: EventType, @StringRes event: Int)
|
fun runCareDialog(fragmentManager: FragmentManager, options: EventType, @StringRes event: Int)
|
||||||
|
|
||||||
|
fun addNotification(id: Int, text: String, level: Int)
|
||||||
|
fun addNotificationValidFor(id: Int, text: String, level: Int, validMinutes: Int)
|
||||||
|
fun addNotificationWithSound(id: Int, text: String, level: Int, @RawRes soundId: Int)
|
||||||
|
fun addNotificationValidTo(id: Int, date: Long, text: String, level: Int, validTo: Long)
|
||||||
}
|
}
|
|
@ -214,8 +214,8 @@ class OpenAPSAMAPlugin @Inject constructor(
|
||||||
override fun applyMaxIOBConstraints(maxIob: Constraint<Double>): Constraint<Double> {
|
override fun applyMaxIOBConstraints(maxIob: Constraint<Double>): Constraint<Double> {
|
||||||
if (isEnabled()) {
|
if (isEnabled()) {
|
||||||
val maxIobPref: Double = sp.getDouble(R.string.key_openapsma_max_iob, 1.5)
|
val maxIobPref: Double = sp.getDouble(R.string.key_openapsma_max_iob, 1.5)
|
||||||
maxIob.setIfSmaller(aapsLogger, maxIobPref, rh.gs(R.string.limitingiob, maxIobPref, rh.gs(R.string.maxvalueinpreferences)), this)
|
maxIob.setIfSmaller(aapsLogger, maxIobPref, rh.gs(R.string.limiting_iob, maxIobPref, rh.gs(R.string.maxvalueinpreferences)), this)
|
||||||
maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobAMA(), rh.gs(R.string.limitingiob, hardLimits.maxIobAMA(), rh.gs(R.string.hardlimit)), this)
|
maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobAMA(), rh.gs(R.string.limiting_iob, hardLimits.maxIobAMA(), rh.gs(R.string.hardlimit)), this)
|
||||||
}
|
}
|
||||||
return maxIob
|
return maxIob
|
||||||
}
|
}
|
||||||
|
|
|
@ -241,8 +241,8 @@ class OpenAPSSMBPlugin @Inject constructor(
|
||||||
override fun applyMaxIOBConstraints(maxIob: Constraint<Double>): Constraint<Double> {
|
override fun applyMaxIOBConstraints(maxIob: Constraint<Double>): Constraint<Double> {
|
||||||
if (isEnabled()) {
|
if (isEnabled()) {
|
||||||
val maxIobPref: Double = sp.getDouble(R.string.key_openapssmb_max_iob, 3.0)
|
val maxIobPref: Double = sp.getDouble(R.string.key_openapssmb_max_iob, 3.0)
|
||||||
maxIob.setIfSmaller(aapsLogger, maxIobPref, rh.gs(R.string.limitingiob, maxIobPref, rh.gs(R.string.maxvalueinpreferences)), this)
|
maxIob.setIfSmaller(aapsLogger, maxIobPref, rh.gs(R.string.limiting_iob, maxIobPref, rh.gs(R.string.maxvalueinpreferences)), this)
|
||||||
maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobSMB(), rh.gs(R.string.limitingiob, hardLimits.maxIobSMB(), rh.gs(R.string.hardlimit)), this)
|
maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobSMB(), rh.gs(R.string.limiting_iob, hardLimits.maxIobSMB(), rh.gs(R.string.hardlimit)), this)
|
||||||
}
|
}
|
||||||
return maxIob
|
return maxIob
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
<string name="autosens_disabled_in_preferences">Autosens disabled in preferences</string>
|
<string name="autosens_disabled_in_preferences">Autosens disabled in preferences</string>
|
||||||
|
|
||||||
<!-- Verify if needed in safety-->
|
<!-- Verify if needed in safety-->
|
||||||
<string name="limitingiob">Limiting IOB to %1$.1f U because of %2$s</string>
|
<string name="limiting_iob">Limiting IOB to %1$.1f U because of %2$s</string>
|
||||||
<string name="maxvalueinpreferences">max value in preferences</string>
|
<string name="maxvalueinpreferences">max value in preferences</string>
|
||||||
<string name="hardlimit">hard limit</string>
|
<string name="hardlimit">hard limit</string>
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,7 @@ class LoopPlugin @Inject constructor(
|
||||||
val loopEnabled = constraintChecker.isLoopInvocationAllowed()
|
val loopEnabled = constraintChecker.isLoopInvocationAllowed()
|
||||||
if (!loopEnabled.value()) {
|
if (!loopEnabled.value()) {
|
||||||
val message = """
|
val message = """
|
||||||
${rh.gs(R.string.loopdisabled)}
|
${rh.gs(R.string.loop_disabled)}
|
||||||
${loopEnabled.getReasons(aapsLogger)}
|
${loopEnabled.getReasons(aapsLogger)}
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
aapsLogger.debug(LTag.APS, message)
|
aapsLogger.debug(LTag.APS, message)
|
||||||
|
|
|
@ -160,7 +160,7 @@ class SafetyPlugin @Inject constructor(
|
||||||
|
|
||||||
override fun applyMaxIOBConstraints(maxIob: Constraint<Double>): Constraint<Double> {
|
override fun applyMaxIOBConstraints(maxIob: Constraint<Double>): Constraint<Double> {
|
||||||
val apsMode = sp.getString(R.string.key_aps_mode, "open")
|
val apsMode = sp.getString(R.string.key_aps_mode, "open")
|
||||||
if (apsMode == "lgs") maxIob.setIfSmaller(aapsLogger, HardLimits.MAX_IOB_LGS, rh.gs(R.string.limitingiob, HardLimits.MAX_IOB_LGS, rh.gs(R.string.lowglucosesuspend)), this)
|
if (apsMode == "lgs") maxIob.setIfSmaller(aapsLogger, HardLimits.MAX_IOB_LGS, rh.gs(R.string.limiting_iob, HardLimits.MAX_IOB_LGS, rh.gs(R.string.lowglucosesuspend)), this)
|
||||||
return maxIob
|
return maxIob
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -886,7 +886,7 @@ class DataHandlerMobile @Inject constructor(
|
||||||
iobSum = DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob)
|
iobSum = DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob)
|
||||||
iobDetail = "(${DecimalFormatter.to2Decimal(bolusIob.iob)}|${DecimalFormatter.to2Decimal(basalIob.basaliob)})"
|
iobDetail = "(${DecimalFormatter.to2Decimal(bolusIob.iob)}|${DecimalFormatter.to2Decimal(basalIob.basaliob)})"
|
||||||
cobString = iobCobCalculator.getCobInfo(false, "WatcherUpdaterService").generateCOBString()
|
cobString = iobCobCalculator.getCobInfo(false, "WatcherUpdaterService").generateCOBString()
|
||||||
currentBasal = iobCobCalculator.getTempBasalIncludingConvertedExtended(System.currentTimeMillis())?.toStringShort() ?: rh.gs(R.string.pump_basebasalrate, profile.getBasal())
|
currentBasal = iobCobCalculator.getTempBasalIncludingConvertedExtended(System.currentTimeMillis())?.toStringShort() ?: rh.gs(R.string.pump_base_basal_rate, profile.getBasal())
|
||||||
|
|
||||||
//bgi
|
//bgi
|
||||||
val bgi = -(bolusIob.activity + basalIob.activity) * 5 * Profile.fromMgdlToUnits(profile.getIsfMgdl(), profileFunction.getUnits())
|
val bgi = -(bolusIob.activity + basalIob.activity) * 5 * Profile.fromMgdlToUnits(profile.getIsfMgdl(), profileFunction.getUnits())
|
||||||
|
|
|
@ -90,7 +90,7 @@ class VirtualPumpFragment : DaggerFragment() {
|
||||||
private fun updateGui() {
|
private fun updateGui() {
|
||||||
if (_binding == null) return
|
if (_binding == null) return
|
||||||
val profile = profileFunction.getProfile() ?: return
|
val profile = profileFunction.getProfile() ?: return
|
||||||
binding.baseBasalRate.text = rh.gs(R.string.pump_basebasalrate, virtualPumpPlugin.baseBasalRate)
|
binding.baseBasalRate.text = rh.gs(R.string.pump_base_basal_rate, virtualPumpPlugin.baseBasalRate)
|
||||||
binding.tempbasal.text = iobCobCalculator.getTempBasal(dateUtil.now())?.toStringFull(profile, dateUtil)
|
binding.tempbasal.text = iobCobCalculator.getTempBasal(dateUtil.now())?.toStringFull(profile, dateUtil)
|
||||||
?: ""
|
?: ""
|
||||||
binding.extendedbolus.text = iobCobCalculator.getExtendedBolus(dateUtil.now())?.toStringFull(dateUtil)
|
binding.extendedbolus.text = iobCobCalculator.getExtendedBolus(dateUtil.now())?.toStringFull(dateUtil)
|
||||||
|
|
|
@ -198,7 +198,7 @@ open class VirtualPumpPlugin @Inject constructor(
|
||||||
.comment(rh.gs(R.string.stop))
|
.comment(rh.gs(R.string.stop))
|
||||||
}
|
}
|
||||||
SystemClock.sleep(200)
|
SystemClock.sleep(200)
|
||||||
bolusingEvent.status = rh.gs(R.string.bolusdelivered, detailedBolusInfo.insulin)
|
bolusingEvent.status = rh.gs(R.string.bolus_delivered, detailedBolusInfo.insulin)
|
||||||
bolusingEvent.percent = 100
|
bolusingEvent.percent = 100
|
||||||
rxBus.send(bolusingEvent)
|
rxBus.send(bolusingEvent)
|
||||||
SystemClock.sleep(1000)
|
SystemClock.sleep(1000)
|
||||||
|
|
|
@ -274,7 +274,7 @@
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="5dp"
|
android:paddingEnd="5dp"
|
||||||
android:text="@string/serialnumber"
|
android:text="@string/serial_number"
|
||||||
android:textAlignment="viewEnd"
|
android:textAlignment="viewEnd"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<!-- Safety -->
|
<!-- Safety -->
|
||||||
<string name="limitingextendedbolus">Begrenze verzögerten Bolus auf %1$.1f IE wegen %2$s</string>
|
<string name="limitingextendedbolus">Begrenze verzögerten Bolus auf %1$.1f IE wegen %2$s</string>
|
||||||
<string name="limitingcarbs">Begrenze Kohlenhydrate auf %1$d g wegen %2$s</string>
|
<string name="limitingcarbs">Begrenze Kohlenhydrate auf %1$d g wegen %2$s</string>
|
||||||
<string name="limitingiob">Begrenze IOB auf %1$.1f IE wegen %2$s</string>
|
<string name="limiting_iob">Begrenze IOB auf %1$.1f IE wegen %2$s</string>
|
||||||
<string name="pumpisnottempbasalcapable">Pumpe verfügt nicht über temporäre Basalraten</string>
|
<string name="pumpisnottempbasalcapable">Pumpe verfügt nicht über temporäre Basalraten</string>
|
||||||
<string name="closedmodedisabledinpreferences">Closed-Loop-Modus in den Einstellungen deaktiviert</string>
|
<string name="closedmodedisabledinpreferences">Closed-Loop-Modus in den Einstellungen deaktiviert</string>
|
||||||
<string name="closed_loop_disabled_on_dev_branch">Entwickler-Version, Closed Loop ist nicht verfügbar.</string>
|
<string name="closed_loop_disabled_on_dev_branch">Entwickler-Version, Closed Loop ist nicht verfügbar.</string>
|
||||||
|
|
|
@ -141,7 +141,7 @@
|
||||||
<!-- Safety -->
|
<!-- Safety -->
|
||||||
<string name="limitingextendedbolus">Limitazione bolo esteso a %1$.1f U a causa di: %2$s</string>
|
<string name="limitingextendedbolus">Limitazione bolo esteso a %1$.1f U a causa di: %2$s</string>
|
||||||
<string name="limitingcarbs">Limitazione carboidrati a %1$d g a causa di: %2$s</string>
|
<string name="limitingcarbs">Limitazione carboidrati a %1$d g a causa di: %2$s</string>
|
||||||
<string name="limitingiob">Limitazione IOB a %1$.1f U a causa di: %2$s</string>
|
<string name="limiting_iob">Limitazione IOB a %1$.1f U a causa di: %2$s</string>
|
||||||
<string name="pumpisnottempbasalcapable">Micro non in grado di impostare la basale temporanea</string>
|
<string name="pumpisnottempbasalcapable">Micro non in grado di impostare la basale temporanea</string>
|
||||||
<string name="closedmodedisabledinpreferences">Modalità loop chiuso disabilitata nelle preferenze</string>
|
<string name="closedmodedisabledinpreferences">Modalità loop chiuso disabilitata nelle preferenze</string>
|
||||||
<string name="closed_loop_disabled_on_dev_branch">Versione sviluppatore in esecuzione. Loop chiuso disabilitato.</string>
|
<string name="closed_loop_disabled_on_dev_branch">Versione sviluppatore in esecuzione. Loop chiuso disabilitato.</string>
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
<!-- Safety -->
|
<!-- Safety -->
|
||||||
<string name="limitingextendedbolus">A limitar bólus estendido para %1$.1f U porque %2$s</string>
|
<string name="limitingextendedbolus">A limitar bólus estendido para %1$.1f U porque %2$s</string>
|
||||||
<string name="limitingcarbs">A limitar hidratos para %1$d g porque %2$s</string>
|
<string name="limitingcarbs">A limitar hidratos para %1$d g porque %2$s</string>
|
||||||
<string name="limitingiob">A limitar IOB para %1$.1f U porque %2$s</string>
|
<string name="limiting_iob">A limitar IOB para %1$.1f U porque %2$s</string>
|
||||||
<string name="pumpisnottempbasalcapable">A bomba não é capaz de basais temporárias</string>
|
<string name="pumpisnottempbasalcapable">A bomba não é capaz de basais temporárias</string>
|
||||||
<string name="closedmodedisabledinpreferences">Loop fecchado disabilitado nas preferências</string>
|
<string name="closedmodedisabledinpreferences">Loop fecchado disabilitado nas preferências</string>
|
||||||
<string name="closed_loop_disabled_on_dev_branch">A correr a versão dev. O Loop fechado está desabilitado.</string>
|
<string name="closed_loop_disabled_on_dev_branch">A correr a versão dev. O Loop fechado está desabilitado.</string>
|
||||||
|
|
|
@ -273,7 +273,6 @@
|
||||||
<!-- Safety -->
|
<!-- Safety -->
|
||||||
<string name="limitingextendedbolus">Limiting extended bolus to %1$.1f U because of %2$s</string>
|
<string name="limitingextendedbolus">Limiting extended bolus to %1$.1f U because of %2$s</string>
|
||||||
<string name="limitingcarbs">Limiting carbs to %1$d g because of %2$s</string>
|
<string name="limitingcarbs">Limiting carbs to %1$d g because of %2$s</string>
|
||||||
<string name="limitingiob">Limiting IOB to %1$.1f U because of %2$s</string>
|
|
||||||
|
|
||||||
<string name="safety" translatable="false">Safety</string>
|
<string name="safety" translatable="false">Safety</string>
|
||||||
<string name="pumpisnottempbasalcapable">Pump is not temp basal capable</string>
|
<string name="pumpisnottempbasalcapable">Pump is not temp basal capable</string>
|
||||||
|
|
|
@ -12,15 +12,18 @@ apply from: "${project.rootDir}/core/core-main/allopen_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/core-main/test_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/test_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/core-main/jacoco_global.gradle"
|
apply from: "${project.rootDir}/core/core-main/jacoco_global.gradle"
|
||||||
android {
|
android {
|
||||||
namespace 'info.nightscout.androidaps.combo'
|
namespace 'info.nightscout.pump.combo'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':libraries')
|
implementation project(':libraries')
|
||||||
implementation project(':core:core-main')
|
|
||||||
implementation project(':core:ui')
|
implementation project(':core:ui')
|
||||||
implementation project(':core:utils')
|
implementation project(':core:utils')
|
||||||
implementation project(':app-wear-shared:rx')
|
implementation project(':app-wear-shared:rx')
|
||||||
implementation project(':app-wear-shared:shared')
|
implementation project(':app-wear-shared:shared')
|
||||||
implementation project(':interfaces')
|
implementation project(':interfaces')
|
||||||
|
|
||||||
|
// RuffyScripter
|
||||||
|
api 'com.google.guava:guava:31.1-jre'
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo
|
package info.nightscout.pump.combo
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
|
@ -8,15 +8,14 @@ import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import dagger.android.support.DaggerFragment
|
import dagger.android.support.DaggerFragment
|
||||||
import info.nightscout.androidaps.combo.R
|
|
||||||
import info.nightscout.androidaps.combo.databinding.CombopumpFragmentBinding
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.data.ComboErrorUtil
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.data.ComboErrorUtil.DisplayType
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.events.EventComboPumpUpdateGUI
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState
|
|
||||||
import info.nightscout.core.utils.fabric.FabricPrivacy
|
import info.nightscout.core.utils.fabric.FabricPrivacy
|
||||||
import info.nightscout.interfaces.queue.Callback
|
import info.nightscout.interfaces.queue.Callback
|
||||||
import info.nightscout.interfaces.queue.CommandQueue
|
import info.nightscout.interfaces.queue.CommandQueue
|
||||||
|
import info.nightscout.pump.combo.data.ComboErrorUtil
|
||||||
|
import info.nightscout.pump.combo.data.ComboErrorUtil.DisplayType
|
||||||
|
import info.nightscout.pump.combo.databinding.CombopumpFragmentBinding
|
||||||
|
import info.nightscout.pump.combo.events.EventComboPumpUpdateGUI
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.PumpState
|
||||||
import info.nightscout.rx.AapsSchedulers
|
import info.nightscout.rx.AapsSchedulers
|
||||||
import info.nightscout.rx.bus.RxBus
|
import info.nightscout.rx.bus.RxBus
|
||||||
import info.nightscout.rx.events.EventQueueChanged
|
import info.nightscout.rx.events.EventQueueChanged
|
||||||
|
@ -204,7 +203,7 @@ class ComboFragment : DaggerFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// base basal rate
|
// base basal rate
|
||||||
binding.comboBaseBasalRate.text = rh.gs(R.string.pump_basebasalrate, comboPlugin.baseBasalRate)
|
binding.comboBaseBasalRate.text = rh.gs(R.string.pump_base_basal_rate, comboPlugin.baseBasalRate)
|
||||||
|
|
||||||
// TBR
|
// TBR
|
||||||
var tbrStr = ""
|
var tbrStr = ""
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo;
|
package info.nightscout.pump.combo;
|
||||||
|
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
|
||||||
|
@ -20,22 +20,6 @@ import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import dagger.android.HasAndroidInjector;
|
import dagger.android.HasAndroidInjector;
|
||||||
import info.nightscout.androidaps.combo.R;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.events.EventComboPumpUpdateGUI;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BasalProfile;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusProgressReporter;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.CommandResult;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.RuffyCommands;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.RuffyScripter;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.WarningOrErrorCode;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Bolus;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistory;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistoryRequest;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Tdd;
|
|
||||||
import info.nightscout.core.events.EventNewNotification;
|
|
||||||
import info.nightscout.core.pump.PumpStateExtensionKt;
|
|
||||||
import info.nightscout.core.utils.fabric.InstanceId;
|
import info.nightscout.core.utils.fabric.InstanceId;
|
||||||
import info.nightscout.interfaces.constraints.Constraint;
|
import info.nightscout.interfaces.constraints.Constraint;
|
||||||
import info.nightscout.interfaces.constraints.Constraints;
|
import info.nightscout.interfaces.constraints.Constraints;
|
||||||
|
@ -53,6 +37,20 @@ import info.nightscout.interfaces.pump.defs.ManufacturerType;
|
||||||
import info.nightscout.interfaces.pump.defs.PumpDescription;
|
import info.nightscout.interfaces.pump.defs.PumpDescription;
|
||||||
import info.nightscout.interfaces.pump.defs.PumpType;
|
import info.nightscout.interfaces.pump.defs.PumpType;
|
||||||
import info.nightscout.interfaces.queue.CommandQueue;
|
import info.nightscout.interfaces.queue.CommandQueue;
|
||||||
|
import info.nightscout.interfaces.ui.ActivityNames;
|
||||||
|
import info.nightscout.pump.combo.events.EventComboPumpUpdateGUI;
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.BasalProfile;
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.BolusProgressReporter;
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.CommandResult;
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.PumpState;
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.PumpWarningCodes;
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.RuffyCommands;
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.RuffyScripter;
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.WarningOrErrorCode;
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.history.Bolus;
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.history.PumpHistory;
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.history.PumpHistoryRequest;
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.history.Tdd;
|
||||||
import info.nightscout.rx.bus.RxBus;
|
import info.nightscout.rx.bus.RxBus;
|
||||||
import info.nightscout.rx.events.EventDismissNotification;
|
import info.nightscout.rx.events.EventDismissNotification;
|
||||||
import info.nightscout.rx.events.EventInitializationChanged;
|
import info.nightscout.rx.events.EventInitializationChanged;
|
||||||
|
@ -97,6 +95,7 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
private final PumpSync pumpSync;
|
private final PumpSync pumpSync;
|
||||||
private final DateUtil dateUtil;
|
private final DateUtil dateUtil;
|
||||||
private final RuffyCommands ruffyScripter;
|
private final RuffyCommands ruffyScripter;
|
||||||
|
private final ActivityNames activityNames;
|
||||||
|
|
||||||
private final static PumpDescription pumpDescription = new PumpDescription();
|
private final static PumpDescription pumpDescription = new PumpDescription();
|
||||||
|
|
||||||
|
@ -151,7 +150,8 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
CommandQueue commandQueue,
|
CommandQueue commandQueue,
|
||||||
PumpSync pumpSync,
|
PumpSync pumpSync,
|
||||||
DateUtil dateUtil,
|
DateUtil dateUtil,
|
||||||
RuffyScripter ruffyScripter
|
RuffyScripter ruffyScripter,
|
||||||
|
ActivityNames activitynames
|
||||||
) {
|
) {
|
||||||
super(new PluginDescription()
|
super(new PluginDescription()
|
||||||
.mainType(PluginType.PUMP)
|
.mainType(PluginType.PUMP)
|
||||||
|
@ -170,6 +170,7 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
this.pumpSync = pumpSync;
|
this.pumpSync = pumpSync;
|
||||||
this.dateUtil = dateUtil;
|
this.dateUtil = dateUtil;
|
||||||
this.ruffyScripter = ruffyScripter;
|
this.ruffyScripter = ruffyScripter;
|
||||||
|
this.activityNames = activitynames;
|
||||||
|
|
||||||
pumpDescription.fillFor(PumpType.ACCU_CHEK_COMBO);
|
pumpDescription.fillFor(PumpType.ACCU_CHEK_COMBO);
|
||||||
}
|
}
|
||||||
|
@ -197,7 +198,7 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
} else if (!pump.initialized) {
|
} else if (!pump.initialized) {
|
||||||
return getRh().gs(R.string.combo_pump_state_initializing);
|
return getRh().gs(R.string.combo_pump_state_initializing);
|
||||||
} else if (!validBasalRateProfileSelectedOnPump) {
|
} else if (!validBasalRateProfileSelectedOnPump) {
|
||||||
return getRh().gs(R.string.loopdisabled);
|
return getRh().gs(R.string.loop_disabled);
|
||||||
}
|
}
|
||||||
return getRh().gs(R.string.combo_pump_state_running);
|
return getRh().gs(R.string.combo_pump_state_running);
|
||||||
}
|
}
|
||||||
|
@ -261,9 +262,8 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
// note that this should not happen anymore since the queue is present, which
|
// note that this should not happen anymore since the queue is present, which
|
||||||
// issues a READSTATE when starting to issue commands which initializes the pump
|
// issues a READSTATE when starting to issue commands which initializes the pump
|
||||||
getAapsLogger().error("setNewBasalProfile not initialized");
|
getAapsLogger().error("setNewBasalProfile not initialized");
|
||||||
Notification notification = new Notification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED, getRh().gs(R.string.pumpNotInitializedProfileNotSet), Notification.URGENT);
|
activityNames.addNotification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED, getRh().gs(R.string.pump_not_initialized_profile_not_set), Notification.URGENT);
|
||||||
rxBus.send(new EventNewNotification(notification));
|
return new PumpEnactResult(getInjector()).success(false).enacted(false).comment(R.string.pump_not_initialized_profile_not_set);
|
||||||
return new PumpEnactResult(getInjector()).success(false).enacted(false).comment(R.string.pumpNotInitializedProfileNotSet);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasalProfile requestedBasalProfile = convertProfileToComboProfile(profile);
|
BasalProfile requestedBasalProfile = convertProfileToComboProfile(profile);
|
||||||
|
@ -282,9 +282,8 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
CommandResult setResult = runCommand(getRh().gs(R.string.combo_activity_setting_basal_profile), 2,
|
CommandResult setResult = runCommand(getRh().gs(R.string.combo_activity_setting_basal_profile), 2,
|
||||||
() -> ruffyScripter.setBasalProfile(requestedBasalProfile));
|
() -> ruffyScripter.setBasalProfile(requestedBasalProfile));
|
||||||
if (!setResult.success) {
|
if (!setResult.success) {
|
||||||
Notification notification = new Notification(Notification.FAILED_UPDATE_PROFILE, getRh().gs(R.string.failedupdatebasalprofile), Notification.URGENT);
|
activityNames.addNotification(Notification.FAILED_UPDATE_PROFILE, getRh().gs(R.string.failed_update_basal_profile), Notification.URGENT);
|
||||||
rxBus.send(new EventNewNotification(notification));
|
return new PumpEnactResult(getInjector()).success(false).enacted(false).comment(R.string.failed_update_basal_profile);
|
||||||
return new PumpEnactResult(getInjector()).success(false).enacted(false).comment(R.string.failedupdatebasalprofile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pump.basalProfile = requestedBasalProfile;
|
pump.basalProfile = requestedBasalProfile;
|
||||||
|
@ -293,8 +292,8 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
rxBus.send(new EventDismissNotification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED));
|
rxBus.send(new EventDismissNotification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED));
|
||||||
rxBus.send(new EventDismissNotification(Notification.FAILED_UPDATE_PROFILE));
|
rxBus.send(new EventDismissNotification(Notification.FAILED_UPDATE_PROFILE));
|
||||||
//issue success notification
|
//issue success notification
|
||||||
Notification notification = new Notification(Notification.PROFILE_SET_OK, getRh().gs(R.string.profile_set_ok), Notification.INFO, 60);
|
activityNames.addNotificationValidFor(Notification.PROFILE_SET_OK,
|
||||||
rxBus.send(new EventNewNotification(notification));
|
getRh().gs(R.string.profile_set_ok), Notification.INFO, 60);
|
||||||
return new PumpEnactResult(getInjector()).success(true).enacted(true);
|
return new PumpEnactResult(getInjector()).success(true).enacted(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,8 +366,9 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
// trigger a connect, which will update state and check history
|
// trigger a connect, which will update state and check history
|
||||||
CommandResult stateResult = runCommand(null, 1, ruffyScripter::readPumpState);
|
CommandResult stateResult = runCommand(null, 1, ruffyScripter::readPumpState);
|
||||||
if (stateResult.invalidSetup) {
|
if (stateResult.invalidSetup) {
|
||||||
rxBus.send(new EventNewNotification(
|
activityNames.addNotification(Notification.COMBO_PUMP_ALARM,
|
||||||
new Notification(Notification.COMBO_PUMP_ALARM, getRh().gs(R.string.combo_invalid_setup), Notification.URGENT)));
|
getRh().gs(R.string.combo_invalid_setup),
|
||||||
|
Notification.URGENT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!stateResult.success) {
|
if (!stateResult.success) {
|
||||||
|
@ -383,11 +383,9 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stateResult.state.unsafeUsageDetected == PumpState.UNSUPPORTED_BASAL_RATE_PROFILE) {
|
if (stateResult.state.unsafeUsageDetected == PumpState.UNSUPPORTED_BASAL_RATE_PROFILE) {
|
||||||
Notification n = new Notification(Notification.COMBO_PUMP_ALARM,
|
activityNames.addNotificationWithSound(Notification.COMBO_PUMP_ALARM,
|
||||||
getRh().gs(R.string.combo_force_disabled_notification),
|
getRh().gs(R.string.combo_force_disabled_notification),
|
||||||
Notification.URGENT);
|
Notification.URGENT, R.raw.alarm);
|
||||||
n.setSoundId(R.raw.alarm);
|
|
||||||
rxBus.send(new EventNewNotification(n));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,8 +406,9 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
long lastBolusTimestamp = recentBoluses.get(0).timestamp;
|
long lastBolusTimestamp = recentBoluses.get(0).timestamp;
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
if (lastBolusTimestamp < now - 24 * 60 * 60 * 1000 || lastBolusTimestamp > now + 5 * 60 * 1000) {
|
if (lastBolusTimestamp < now - 24 * 60 * 60 * 1000 || lastBolusTimestamp > now + 5 * 60 * 1000) {
|
||||||
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, getRh().gs(R.string.combo_check_date), Notification.URGENT);
|
activityNames.addNotification(Notification.COMBO_PUMP_ALARM,
|
||||||
rxBus.send(new EventNewNotification(notification));
|
getRh().gs(R.string.combo_check_date),
|
||||||
|
Notification.URGENT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -480,7 +479,7 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
event.setStatus(getRh().gs(R.string.bolus_delivering, delivered));
|
event.setStatus(getRh().gs(R.string.bolus_delivering, delivered));
|
||||||
break;
|
break;
|
||||||
case DELIVERED:
|
case DELIVERED:
|
||||||
event.setStatus(getRh().gs(R.string.bolusdelivered, delivered));
|
event.setStatus(getRh().gs(R.string.bolus_delivered, delivered));
|
||||||
break;
|
break;
|
||||||
case STOPPING:
|
case STOPPING:
|
||||||
event.setStatus(getRh().gs(R.string.bolusstopping));
|
event.setStatus(getRh().gs(R.string.bolusstopping));
|
||||||
|
@ -607,8 +606,8 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
// check pump bolus record has a sane timestamp
|
// check pump bolus record has a sane timestamp
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
if (lastPumpBolus.timestamp < now - 10 * 60 * 1000 || lastPumpBolus.timestamp > now + 10 * 60 * 1000) {
|
if (lastPumpBolus.timestamp < now - 10 * 60 * 1000 || lastPumpBolus.timestamp > now + 10 * 60 * 1000) {
|
||||||
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, getRh().gs(R.string.combo_suspious_bolus_time), Notification.URGENT);
|
activityNames.addNotification(Notification.COMBO_PUMP_ALARM,
|
||||||
rxBus.send(new EventNewNotification(notification));
|
getRh().gs(R.string.combo_suspious_bolus_time), Notification.URGENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update `recentBoluses` so the bolus was just delivered won't be detected as a new
|
// update `recentBoluses` so the bolus was just delivered won't be detected as a new
|
||||||
|
@ -676,8 +675,8 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
getAapsLogger().error("Adding treatment record failed", e);
|
getAapsLogger().error("Adding treatment record failed", e);
|
||||||
if (detailedBolusInfo.getBolusType() == DetailedBolusInfo.BolusType.SMB) {
|
if (detailedBolusInfo.getBolusType() == DetailedBolusInfo.BolusType.SMB) {
|
||||||
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, getRh().gs(R.string.combo_error_updating_treatment_record), Notification.URGENT);
|
activityNames.addNotification(Notification.COMBO_PUMP_ALARM,
|
||||||
rxBus.send(new EventNewNotification(notification));
|
getRh().gs(R.string.combo_error_updating_treatment_record), Notification.URGENT);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -829,15 +828,16 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
} else if (activeTemp == null) {
|
} else if (activeTemp == null) {
|
||||||
return new PumpEnactResult(getInjector()).success(true).enacted(false);
|
return new PumpEnactResult(getInjector()).success(true).enacted(false);
|
||||||
} else if ((activeTemp.getRate() >= 90 && activeTemp.getRate() <= 110)
|
} else if ((activeTemp.getRate() >= 90 && activeTemp.getRate() <= 110)
|
||||||
&& PumpStateExtensionKt.getPlannedRemainingMinutes(activeTemp) <= 15) {
|
&& activeTemp.getPlannedRemainingMinutes() <= 15) {
|
||||||
// Let fake neutral temp keep run (see below)
|
// Let fake neutral temp keep run (see below)
|
||||||
// Note that since this runs on the queue a connection is opened regardless, but this
|
// Note that since this runs on the queue a connection is opened regardless, but this
|
||||||
// case doesn't occur all that often, so it's not worth optimizing (1.3k SetTBR vs 4 cancelTBR).
|
// case doesn't occur all that often, so it's not worth optimizing (1.3k SetTBR vs 4 cancelTBR).
|
||||||
getAapsLogger().debug(LTag.PUMP, "cancelTempBasal: skipping changing tbr since it already is at " + activeTemp.getRate() + "% and running for another " + PumpStateExtensionKt.getPlannedRemainingMinutes(activeTemp) + " mins.");
|
getAapsLogger().debug(LTag.PUMP, "cancelTempBasal: skipping changing tbr since it " +
|
||||||
|
"already is at " + activeTemp.getRate() + "% and running for another " + activeTemp.getPlannedRemainingMinutes() + " mins.");
|
||||||
return new PumpEnactResult(getInjector()).success(true).enacted(true)
|
return new PumpEnactResult(getInjector()).success(true).enacted(true)
|
||||||
.comment("cancelTempBasal skipping changing tbr since it already is at "
|
.comment("cancelTempBasal skipping changing tbr since it already is at "
|
||||||
+ activeTemp.getRate() + "% and running for another "
|
+ activeTemp.getRate() + "% and running for another "
|
||||||
+ PumpStateExtensionKt.getPlannedRemainingMinutes(activeTemp) + " mins.");
|
+ activeTemp.getPlannedRemainingMinutes() + " mins.");
|
||||||
} else {
|
} else {
|
||||||
// Set a fake neutral temp to avoid TBR cancel alert. Decide 90% vs 110% based on
|
// Set a fake neutral temp to avoid TBR cancel alert. Decide 90% vs 110% based on
|
||||||
// on whether the TBR we're cancelling is above or below 100%.
|
// on whether the TBR we're cancelling is above or below 100%.
|
||||||
|
@ -898,11 +898,9 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
pump.lastSuccessfulCmdTime = System.currentTimeMillis();
|
pump.lastSuccessfulCmdTime = System.currentTimeMillis();
|
||||||
if (validBasalRateProfileSelectedOnPump && commandResult.state.unsafeUsageDetected == PumpState.UNSUPPORTED_BASAL_RATE_PROFILE) {
|
if (validBasalRateProfileSelectedOnPump && commandResult.state.unsafeUsageDetected == PumpState.UNSUPPORTED_BASAL_RATE_PROFILE) {
|
||||||
setValidBasalRateProfileSelectedOnPump(false);
|
setValidBasalRateProfileSelectedOnPump(false);
|
||||||
Notification n = new Notification(Notification.COMBO_PUMP_ALARM,
|
activityNames.addNotificationWithSound(Notification.COMBO_PUMP_ALARM,
|
||||||
getRh().gs(R.string.combo_force_disabled_notification),
|
getRh().gs(R.string.combo_force_disabled_notification),
|
||||||
Notification.URGENT);
|
Notification.URGENT, R.raw.alarm);
|
||||||
n.setSoundId(R.raw.alarm);
|
|
||||||
rxBus.send(new EventNewNotification(n));
|
|
||||||
commandQueue.cancelTempBasal(true, null);
|
commandQueue.cancelTempBasal(true, null);
|
||||||
}
|
}
|
||||||
updateLocalData(commandResult);
|
updateLocalData(commandResult);
|
||||||
|
@ -949,8 +947,8 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
// so update the var with it, so the check routines below can work on it
|
// so update the var with it, so the check routines below can work on it
|
||||||
preCheckResult = alertConfirmationResult;
|
preCheckResult = alertConfirmationResult;
|
||||||
} else if (activeAlert.errorCode != null) {
|
} else if (activeAlert.errorCode != null) {
|
||||||
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, dateUtil.now(), getRh().gs(R.string.combo_is_in_error_state, activeAlert.errorCode, activeAlert.message), Notification.URGENT, 0);
|
activityNames.addNotificationValidTo(Notification.COMBO_PUMP_ALARM, dateUtil.now(),
|
||||||
rxBus.send(new EventNewNotification(notification));
|
getRh().gs(R.string.combo_is_in_error_state, activeAlert.errorCode, activeAlert.message), Notification.URGENT, 0);
|
||||||
return preCheckResult.success(false);
|
return preCheckResult.success(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1013,11 +1011,11 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
CommandResult readBasalResult = runCommand(getRh().gs(R.string.combo_actvity_reading_basal_profile), 2, ruffyScripter::readBasalProfile);
|
CommandResult readBasalResult = runCommand(getRh().gs(R.string.combo_actvity_reading_basal_profile), 2, ruffyScripter::readBasalProfile);
|
||||||
if (readBasalResult.success) {
|
if (readBasalResult.success) {
|
||||||
pump.basalProfile = readBasalResult.basalProfile;
|
pump.basalProfile = readBasalResult.basalProfile;
|
||||||
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, getRh().gs(R.string.combo_warning_pump_basal_rate_changed), Notification.NORMAL);
|
activityNames.addNotification(Notification.COMBO_PUMP_ALARM,
|
||||||
rxBus.send(new EventNewNotification(notification));
|
getRh().gs(R.string.combo_warning_pump_basal_rate_changed), Notification.NORMAL);
|
||||||
} else {
|
} else {
|
||||||
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, getRh().gs(R.string.combo_error_failure_reading_changed_basal_rate), Notification.URGENT);
|
activityNames.addNotification(Notification.COMBO_PUMP_ALARM,
|
||||||
rxBus.send(new EventNewNotification(notification));
|
getRh().gs(R.string.combo_error_failure_reading_changed_basal_rate), Notification.URGENT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1031,12 +1029,10 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
// time couldn't be read (e.g. a warning is displayed on the menu , hiding the time field)
|
// time couldn't be read (e.g. a warning is displayed on the menu , hiding the time field)
|
||||||
} else if (Math.abs(state.pumpTime - System.currentTimeMillis()) >= 10 * 60 * 1000) {
|
} else if (Math.abs(state.pumpTime - System.currentTimeMillis()) >= 10 * 60 * 1000) {
|
||||||
getAapsLogger().debug(LTag.PUMP, "Pump clock needs update, pump time: " + state.pumpTime + " (" + new Date(state.pumpTime) + ")");
|
getAapsLogger().debug(LTag.PUMP, "Pump clock needs update, pump time: " + state.pumpTime + " (" + new Date(state.pumpTime) + ")");
|
||||||
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, getRh().gs(R.string.combo_notification_check_time_date), Notification.URGENT);
|
activityNames.addNotification(Notification.COMBO_PUMP_ALARM, getRh().gs(R.string.combo_notification_check_time_date), Notification.URGENT);
|
||||||
rxBus.send(new EventNewNotification(notification));
|
|
||||||
} else if (Math.abs(state.pumpTime - System.currentTimeMillis()) >= 3 * 60 * 1000) {
|
} else if (Math.abs(state.pumpTime - System.currentTimeMillis()) >= 3 * 60 * 1000) {
|
||||||
getAapsLogger().debug(LTag.PUMP, "Pump clock needs update, pump time: " + state.pumpTime + " (" + new Date(state.pumpTime) + ")");
|
getAapsLogger().debug(LTag.PUMP, "Pump clock needs update, pump time: " + state.pumpTime + " (" + new Date(state.pumpTime) + ")");
|
||||||
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, getRh().gs(R.string.combo_notification_check_time_date), Notification.NORMAL);
|
activityNames.addNotification(Notification.COMBO_PUMP_ALARM, getRh().gs(R.string.combo_notification_check_time_date), Notification.NORMAL);
|
||||||
rxBus.send(new EventNewNotification(notification));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1047,18 +1043,15 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
&& !activeAlert.warningCode.equals(PumpWarningCodes.TBR_CANCELLED))) {
|
&& !activeAlert.warningCode.equals(PumpWarningCodes.TBR_CANCELLED))) {
|
||||||
throw new IllegalArgumentException(activeAlert.toString());
|
throw new IllegalArgumentException(activeAlert.toString());
|
||||||
}
|
}
|
||||||
Notification notification = new Notification();
|
String text = "";
|
||||||
notification.setDate(dateUtil.now());
|
|
||||||
notification.setId(Notification.COMBO_PUMP_ALARM);
|
|
||||||
notification.setLevel(Notification.NORMAL);
|
|
||||||
if (activeAlert.warningCode == PumpWarningCodes.CARTRIDGE_LOW) {
|
if (activeAlert.warningCode == PumpWarningCodes.CARTRIDGE_LOW) {
|
||||||
notification.setText(getRh().gs(R.string.combo_pump_cartridge_low_warrning));
|
text = getRh().gs(R.string.combo_pump_cartridge_low_warrning);
|
||||||
} else if (activeAlert.warningCode == PumpWarningCodes.BATTERY_LOW) {
|
} else if (activeAlert.warningCode == PumpWarningCodes.BATTERY_LOW) {
|
||||||
notification.setText(getRh().gs(R.string.combo_pump_battery_low_warrning));
|
text = getRh().gs(R.string.combo_pump_battery_low_warrning);
|
||||||
} else if (activeAlert.warningCode == PumpWarningCodes.TBR_CANCELLED) {
|
} else if (activeAlert.warningCode == PumpWarningCodes.TBR_CANCELLED) {
|
||||||
notification.setText(getRh().gs(R.string.combo_pump_tbr_cancelled_warrning));
|
text = getRh().gs(R.string.combo_pump_tbr_cancelled_warrning);
|
||||||
}
|
}
|
||||||
rxBus.send(new EventNewNotification(notification));
|
activityNames.addNotification(Notification.COMBO_PUMP_ALARM, text, Notification.NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkForUnsafeUsage(CommandResult commandResult) {
|
private void checkForUnsafeUsage(CommandResult commandResult) {
|
||||||
|
@ -1077,11 +1070,9 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
if (lastViolation > 0) {
|
if (lastViolation > 0) {
|
||||||
lowSuspendOnlyLoopEnforcedUntil = lastViolation + 6 * 60 * 60 * 1000;
|
lowSuspendOnlyLoopEnforcedUntil = lastViolation + 6 * 60 * 60 * 1000;
|
||||||
if (lowSuspendOnlyLoopEnforcedUntil > System.currentTimeMillis() && violationWarningRaisedForBolusAt != lowSuspendOnlyLoopEnforcedUntil) {
|
if (lowSuspendOnlyLoopEnforcedUntil > System.currentTimeMillis() && violationWarningRaisedForBolusAt != lowSuspendOnlyLoopEnforcedUntil) {
|
||||||
Notification n = new Notification(Notification.COMBO_PUMP_ALARM,
|
activityNames.addNotificationWithSound(Notification.COMBO_PUMP_ALARM,
|
||||||
getRh().gs(R.string.combo_low_suspend_forced_notification),
|
getRh().gs(R.string.combo_low_suspend_forced_notification),
|
||||||
Notification.URGENT);
|
Notification.URGENT, R.raw.alarm);
|
||||||
n.setSoundId(R.raw.alarm);
|
|
||||||
rxBus.send(new EventNewNotification(n));
|
|
||||||
violationWarningRaisedForBolusAt = lowSuspendOnlyLoopEnforcedUntil;
|
violationWarningRaisedForBolusAt = lowSuspendOnlyLoopEnforcedUntil;
|
||||||
commandQueue.cancelTempBasal(true, null);
|
commandQueue.cancelTempBasal(true, null);
|
||||||
}
|
}
|
||||||
|
@ -1109,7 +1100,7 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
PumpType.ACCU_CHEK_COMBO,
|
PumpType.ACCU_CHEK_COMBO,
|
||||||
serialNumber()
|
serialNumber()
|
||||||
);
|
);
|
||||||
} else if (aapsTbr != null && PumpStateExtensionKt.getPlannedRemainingMinutes(aapsTbr) > 2 && !state.tbrActive) {
|
} else if (aapsTbr != null && aapsTbr.getPlannedRemainingMinutes() > 2 && !state.tbrActive) {
|
||||||
getAapsLogger().debug(LTag.PUMP, "Ending AAPS-TBR since pump has no TBR active");
|
getAapsLogger().debug(LTag.PUMP, "Ending AAPS-TBR since pump has no TBR active");
|
||||||
pumpSync.syncStopTemporaryBasalWithPumpId(
|
pumpSync.syncStopTemporaryBasalWithPumpId(
|
||||||
now,
|
now,
|
||||||
|
@ -1119,7 +1110,7 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
);
|
);
|
||||||
} else if (aapsTbr != null && state.tbrActive
|
} else if (aapsTbr != null && state.tbrActive
|
||||||
&& (aapsTbr.getRate() != state.tbrPercent ||
|
&& (aapsTbr.getRate() != state.tbrPercent ||
|
||||||
Math.abs(PumpStateExtensionKt.getPlannedRemainingMinutes(aapsTbr) - state.tbrRemainingDuration) > 2)) {
|
Math.abs(aapsTbr.getPlannedRemainingMinutes() - state.tbrRemainingDuration) > 2)) {
|
||||||
getAapsLogger().debug(LTag.PUMP, "AAPSs and pump-TBR differ; ending AAPS-TBR and creating new TBR based on pump TBR");
|
getAapsLogger().debug(LTag.PUMP, "AAPSs and pump-TBR differ; ending AAPS-TBR and creating new TBR based on pump TBR");
|
||||||
|
|
||||||
// crate TBR end record a second ago
|
// crate TBR end record a second ago
|
||||||
|
@ -1249,9 +1240,8 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
HashSet<Bolus> bolusSet = new HashSet<>(historyResult.history.bolusHistory);
|
HashSet<Bolus> bolusSet = new HashSet<>(historyResult.history.bolusHistory);
|
||||||
if (bolusSet.size() != historyResult.history.bolusHistory.size()) {
|
if (bolusSet.size() != historyResult.history.bolusHistory.size()) {
|
||||||
getAapsLogger().debug(LTag.PUMP, "Bolus with same amount within the same minute imported. Only one will make it to the DB.");
|
getAapsLogger().debug(LTag.PUMP, "Bolus with same amount within the same minute imported. Only one will make it to the DB.");
|
||||||
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, getRh().gs(R.string.
|
activityNames.addNotification(Notification.COMBO_PUMP_ALARM, getRh().gs(R.string.
|
||||||
combo_error_multiple_boluses_with_identical_timestamp), Notification.URGENT);
|
combo_error_multiple_boluses_with_identical_timestamp), Notification.URGENT);
|
||||||
rxBus.send(new EventNewNotification(notification));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pumpHistoryChanged = updateDbFromPumpHistory(historyResult.history);
|
pumpHistoryChanged = updateDbFromPumpHistory(historyResult.history);
|
||||||
|
@ -1405,14 +1395,14 @@ public class ComboPlugin extends PumpPluginBase implements Pump, Constraints {
|
||||||
@NonNull @Override
|
@NonNull @Override
|
||||||
public Constraint<Boolean> isLoopInvocationAllowed(@NonNull Constraint<Boolean> value) {
|
public Constraint<Boolean> isLoopInvocationAllowed(@NonNull Constraint<Boolean> value) {
|
||||||
if (!validBasalRateProfileSelectedOnPump)
|
if (!validBasalRateProfileSelectedOnPump)
|
||||||
value.set(getAapsLogger(), false, getRh().gs(R.string.novalidbasalrate), this);
|
value.set(getAapsLogger(), false, getRh().gs(R.string.no_valid_basal_rate), this);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull @Override
|
@NonNull @Override
|
||||||
public Constraint<Double> applyMaxIOBConstraints(@NonNull Constraint<Double> maxIob) {
|
public Constraint<Double> applyMaxIOBConstraints(@NonNull Constraint<Double> maxIob) {
|
||||||
if (lowSuspendOnlyLoopEnforcedUntil > System.currentTimeMillis())
|
if (lowSuspendOnlyLoopEnforcedUntil > System.currentTimeMillis())
|
||||||
maxIob.setIfSmaller(getAapsLogger(), 0d, getRh().gs(R.string.limitingmaxiob, 0d, getRh().gs(R.string.unsafeusage)), this);
|
maxIob.setIfSmaller(getAapsLogger(), 0d, getRh().gs(R.string.limiting_iob, 0d, getRh().gs(R.string.unsafeusage)), this);
|
||||||
return maxIob;
|
return maxIob;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo;
|
package info.nightscout.pump.combo;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
@ -6,11 +6,11 @@ import androidx.annotation.Nullable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BasalProfile;
|
import info.nightscout.pump.combo.ruffyscripter.BasalProfile;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
import info.nightscout.pump.combo.ruffyscripter.PumpState;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Bolus;
|
import info.nightscout.pump.combo.ruffyscripter.history.Bolus;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpAlert;
|
import info.nightscout.pump.combo.ruffyscripter.history.PumpAlert;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Tdd;
|
import info.nightscout.pump.combo.ruffyscripter.history.Tdd;
|
||||||
|
|
||||||
class ComboPump {
|
class ComboPump {
|
||||||
boolean initialized = false;
|
boolean initialized = false;
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.data
|
package info.nightscout.pump.combo.data
|
||||||
|
|
||||||
import info.nightscout.androidaps.combo.R
|
import info.nightscout.pump.combo.R
|
||||||
import info.nightscout.shared.sharedPreferences.SP
|
import info.nightscout.shared.sharedPreferences.SP
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
|
@ -2,7 +2,7 @@ package info.nightscout.androidaps.danars.di
|
||||||
|
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
import dagger.android.ContributesAndroidInjector
|
import dagger.android.ContributesAndroidInjector
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ComboFragment
|
import info.nightscout.pump.combo.ComboFragment
|
||||||
|
|
||||||
@Module
|
@Module
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.combo.di
|
package info.nightscout.pump.combo.di
|
||||||
|
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
import info.nightscout.androidaps.danars.di.ComboActivitiesModule
|
import info.nightscout.androidaps.danars.di.ComboActivitiesModule
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.events
|
package info.nightscout.pump.combo.events
|
||||||
|
|
||||||
import info.nightscout.rx.events.EventUpdateGui
|
import info.nightscout.rx.events.EventUpdateGui
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter;
|
package info.nightscout.pump.combo.ruffyscripter;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter;
|
package info.nightscout.pump.combo.ruffyscripter;
|
||||||
|
|
||||||
public interface BolusProgressReporter {
|
public interface BolusProgressReporter {
|
||||||
enum State {
|
enum State {
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter;
|
package info.nightscout.pump.combo.ruffyscripter;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
@ -6,7 +6,7 @@ import androidx.annotation.Nullable;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistory;
|
import info.nightscout.pump.combo.ruffyscripter.history.PumpHistory;
|
||||||
|
|
||||||
public class CommandResult {
|
public class CommandResult {
|
||||||
/** True if a condition indicating a broken pump setup/configuration is detected */
|
/** True if a condition indicating a broken pump setup/configuration is detected */
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter;
|
package info.nightscout.pump.combo.ruffyscripter;
|
||||||
|
|
||||||
public class PumpErrorCodes {
|
public class PumpErrorCodes {
|
||||||
public static final int CARTRIDGE_EMPTY = 1;
|
public static final int CARTRIDGE_EMPTY = 1;
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter;
|
package info.nightscout.pump.combo.ruffyscripter;
|
||||||
|
|
||||||
/** State displayed on the main screen of the pump. */
|
/** State displayed on the main screen of the pump. */
|
||||||
public class PumpState {
|
public class PumpState {
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter;
|
package info.nightscout.pump.combo.ruffyscripter;
|
||||||
|
|
||||||
public class PumpWarningCodes {
|
public class PumpWarningCodes {
|
||||||
public static final int CARTRIDGE_LOW = 1;
|
public static final int CARTRIDGE_LOW = 1;
|
|
@ -1,7 +1,8 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter;
|
package info.nightscout.pump.combo.ruffyscripter;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistoryRequest;
|
|
||||||
|
import info.nightscout.pump.combo.ruffyscripter.history.PumpHistoryRequest;
|
||||||
|
|
||||||
public interface RuffyCommands {
|
public interface RuffyCommands {
|
||||||
/** Issues a bolus issues updates on progress through via {@link BolusProgressReporter}. */
|
/** Issues a bolus issues updates on progress through via {@link BolusProgressReporter}. */
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter;
|
package info.nightscout.pump.combo.ruffyscripter;
|
||||||
|
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
@ -28,19 +28,19 @@ import java.util.Objects;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.data.ComboErrorUtil;
|
import info.nightscout.pump.combo.data.ComboErrorUtil;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.BolusCommand;
|
import info.nightscout.pump.combo.ruffyscripter.commands.BolusCommand;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.CancelTbrCommand;
|
import info.nightscout.pump.combo.ruffyscripter.commands.CancelTbrCommand;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.Command;
|
import info.nightscout.pump.combo.ruffyscripter.commands.Command;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.CommandException;
|
import info.nightscout.pump.combo.ruffyscripter.commands.CommandException;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.ConfirmAlertCommand;
|
import info.nightscout.pump.combo.ruffyscripter.commands.ConfirmAlertCommand;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.ReadBasalProfileCommand;
|
import info.nightscout.pump.combo.ruffyscripter.commands.ReadBasalProfileCommand;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.ReadHistoryCommand;
|
import info.nightscout.pump.combo.ruffyscripter.commands.ReadHistoryCommand;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.ReadPumpStateCommand;
|
import info.nightscout.pump.combo.ruffyscripter.commands.ReadPumpStateCommand;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.ReadQuickInfoCommand;
|
import info.nightscout.pump.combo.ruffyscripter.commands.ReadQuickInfoCommand;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.SetBasalProfileCommand;
|
import info.nightscout.pump.combo.ruffyscripter.commands.SetBasalProfileCommand;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.SetTbrCommand;
|
import info.nightscout.pump.combo.ruffyscripter.commands.SetTbrCommand;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistoryRequest;
|
import info.nightscout.pump.combo.ruffyscripter.history.PumpHistoryRequest;
|
||||||
import info.nightscout.rx.logging.AAPSLogger;
|
import info.nightscout.rx.logging.AAPSLogger;
|
||||||
import info.nightscout.rx.logging.LTag;
|
import info.nightscout.rx.logging.LTag;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter;
|
package info.nightscout.pump.combo.ruffyscripter;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands;
|
package info.nightscout.pump.combo.ruffyscripter.commands;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
@ -12,10 +12,10 @@ import java.util.Calendar;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.CommandResult;
|
import info.nightscout.pump.combo.ruffyscripter.CommandResult;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes;
|
import info.nightscout.pump.combo.ruffyscripter.PumpWarningCodes;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.RuffyScripter;
|
import info.nightscout.pump.combo.ruffyscripter.RuffyScripter;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Bolus;
|
import info.nightscout.pump.combo.ruffyscripter.history.Bolus;
|
||||||
|
|
||||||
public abstract class BaseCommand implements Command {
|
public abstract class BaseCommand implements Command {
|
||||||
// RS will inject itself here
|
// RS will inject itself here
|
|
@ -1,10 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands;
|
package info.nightscout.pump.combo.ruffyscripter.commands;
|
||||||
|
|
||||||
import static info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusProgressReporter.State.DELIVERED;
|
|
||||||
import static info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusProgressReporter.State.DELIVERING;
|
|
||||||
import static info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusProgressReporter.State.PROGRAMMING;
|
|
||||||
import static info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusProgressReporter.State.STOPPED;
|
|
||||||
import static info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusProgressReporter.State.STOPPING;
|
|
||||||
|
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
|
||||||
|
@ -17,10 +11,10 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusProgressReporter;
|
import info.nightscout.pump.combo.ruffyscripter.BolusProgressReporter;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes;
|
import info.nightscout.pump.combo.ruffyscripter.PumpWarningCodes;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.RuffyScripter;
|
import info.nightscout.pump.combo.ruffyscripter.RuffyScripter;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.WarningOrErrorCode;
|
import info.nightscout.pump.combo.ruffyscripter.WarningOrErrorCode;
|
||||||
import info.nightscout.rx.logging.AAPSLogger;
|
import info.nightscout.rx.logging.AAPSLogger;
|
||||||
import info.nightscout.rx.logging.LTag;
|
import info.nightscout.rx.logging.LTag;
|
||||||
|
|
||||||
|
@ -57,22 +51,22 @@ public class BolusCommand extends BaseCommand {
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
if (cancelRequested) {
|
if (cancelRequested) {
|
||||||
bolusProgressReporter.report(STOPPED, 0, 0);
|
bolusProgressReporter.report(BolusProgressReporter.State.STOPPED, 0, 0);
|
||||||
result.success = true;
|
result.success = true;
|
||||||
aapsLogger.debug(LTag.PUMP, "Stage 0: cancelled bolus before programming");
|
aapsLogger.debug(LTag.PUMP, "Stage 0: cancelled bolus before programming");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bolusProgressReporter.report(PROGRAMMING, 0, 0);
|
bolusProgressReporter.report(BolusProgressReporter.State.PROGRAMMING, 0, 0);
|
||||||
enterBolusMenu();
|
enterBolusMenu();
|
||||||
inputBolusAmount();
|
inputBolusAmount();
|
||||||
verifyDisplayedBolusAmount();
|
verifyDisplayedBolusAmount();
|
||||||
|
|
||||||
// last chance to abort before confirming the bolus
|
// last chance to abort before confirming the bolus
|
||||||
if (cancelRequested) {
|
if (cancelRequested) {
|
||||||
bolusProgressReporter.report(STOPPING, 0, 0);
|
bolusProgressReporter.report(BolusProgressReporter.State.STOPPING, 0, 0);
|
||||||
scripter.returnToRootMenu();
|
scripter.returnToRootMenu();
|
||||||
bolusProgressReporter.report(STOPPED, 0, 0);
|
bolusProgressReporter.report(BolusProgressReporter.State.STOPPED, 0, 0);
|
||||||
result.success = true;
|
result.success = true;
|
||||||
aapsLogger.debug(LTag.PUMP, "Stage 1: cancelled bolus after programming");
|
aapsLogger.debug(LTag.PUMP, "Stage 1: cancelled bolus after programming");
|
||||||
return;
|
return;
|
||||||
|
@ -87,14 +81,14 @@ public class BolusCommand extends BaseCommand {
|
||||||
while (scripter.getCurrentMenu().getType() == MenuType.BOLUS_ENTER) {
|
while (scripter.getCurrentMenu().getType() == MenuType.BOLUS_ENTER) {
|
||||||
if (cancelRequested) {
|
if (cancelRequested) {
|
||||||
aapsLogger.debug(LTag.PUMP, "Stage 2: cancelling during confirmation wait");
|
aapsLogger.debug(LTag.PUMP, "Stage 2: cancelling during confirmation wait");
|
||||||
bolusProgressReporter.report(STOPPING, 0, 0);
|
bolusProgressReporter.report(BolusProgressReporter.State.STOPPING, 0, 0);
|
||||||
scripter.pressUpKey();
|
scripter.pressUpKey();
|
||||||
// wait up to 1s for a BOLUS_CANCELLED alert, if it doesn't happen we missed
|
// wait up to 1s for a BOLUS_CANCELLED alert, if it doesn't happen we missed
|
||||||
// the window, simply continue and let the next cancel attempt try its luck
|
// the window, simply continue and let the next cancel attempt try its luck
|
||||||
boolean alertWasCancelled = scripter.confirmAlert(PumpWarningCodes.BOLUS_CANCELLED, 1000);
|
boolean alertWasCancelled = scripter.confirmAlert(PumpWarningCodes.BOLUS_CANCELLED, 1000);
|
||||||
if (alertWasCancelled) {
|
if (alertWasCancelled) {
|
||||||
aapsLogger.debug(LTag.PUMP, "Stage 2: successfully cancelled during confirmation wait");
|
aapsLogger.debug(LTag.PUMP, "Stage 2: successfully cancelled during confirmation wait");
|
||||||
bolusProgressReporter.report(STOPPED, 0, 0);
|
bolusProgressReporter.report(BolusProgressReporter.State.STOPPED, 0, 0);
|
||||||
result.success = true;
|
result.success = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -106,7 +100,7 @@ public class BolusCommand extends BaseCommand {
|
||||||
scripter.verifyMenuIsDisplayed(MenuType.MAIN_MENU,
|
scripter.verifyMenuIsDisplayed(MenuType.MAIN_MENU,
|
||||||
"Pump did not return to MAIN_MEU from BOLUS_ENTER to deliver bolus. "
|
"Pump did not return to MAIN_MEU from BOLUS_ENTER to deliver bolus. "
|
||||||
+ "Check pump manually, the bolus might not have been delivered.");
|
+ "Check pump manually, the bolus might not have been delivered.");
|
||||||
bolusProgressReporter.report(DELIVERING, 0, 0);
|
bolusProgressReporter.report(BolusProgressReporter.State.DELIVERING, 0, 0);
|
||||||
|
|
||||||
// wait for bolus delivery to complete; the remaining units to deliver are counted down
|
// wait for bolus delivery to complete; the remaining units to deliver are counted down
|
||||||
boolean cancelInProgress = false;
|
boolean cancelInProgress = false;
|
||||||
|
@ -116,7 +110,7 @@ public class BolusCommand extends BaseCommand {
|
||||||
while (bolusRemaining != null || scripter.getCurrentMenu().getType() == MenuType.WARNING_OR_ERROR) {
|
while (bolusRemaining != null || scripter.getCurrentMenu().getType() == MenuType.WARNING_OR_ERROR) {
|
||||||
if (cancelRequested && !cancelInProgress) {
|
if (cancelRequested && !cancelInProgress) {
|
||||||
aapsLogger.debug(LTag.PUMP, "Stage 3: cancellation while delivering bolus");
|
aapsLogger.debug(LTag.PUMP, "Stage 3: cancellation while delivering bolus");
|
||||||
bolusProgressReporter.report(STOPPING, 0, 0);
|
bolusProgressReporter.report(BolusProgressReporter.State.STOPPING, 0, 0);
|
||||||
cancelInProgress = true;
|
cancelInProgress = true;
|
||||||
cancellationThread = new Thread(() ->
|
cancellationThread = new Thread(() ->
|
||||||
scripter.pressKeyMs(RuffyScripter.Key.UP, 3000), "bolus-canceller");
|
scripter.pressKeyMs(RuffyScripter.Key.UP, 3000), "bolus-canceller");
|
||||||
|
@ -140,7 +134,7 @@ public class BolusCommand extends BaseCommand {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scripter.confirmAlert(PumpWarningCodes.BOLUS_CANCELLED, 2000);
|
scripter.confirmAlert(PumpWarningCodes.BOLUS_CANCELLED, 2000);
|
||||||
bolusProgressReporter.report(STOPPED, 0, 0);
|
bolusProgressReporter.report(BolusProgressReporter.State.STOPPED, 0, 0);
|
||||||
aapsLogger.debug(LTag.PUMP, "Stage 3: confirmed BOLUS CANCELLED after cancelling bolus during delivery");
|
aapsLogger.debug(LTag.PUMP, "Stage 3: confirmed BOLUS CANCELLED after cancelling bolus during delivery");
|
||||||
} else if (Objects.equals(warningCode, PumpWarningCodes.CARTRIDGE_LOW)) {
|
} else if (Objects.equals(warningCode, PumpWarningCodes.CARTRIDGE_LOW)) {
|
||||||
scripter.confirmAlert(PumpWarningCodes.CARTRIDGE_LOW, 2000);
|
scripter.confirmAlert(PumpWarningCodes.CARTRIDGE_LOW, 2000);
|
||||||
|
@ -169,7 +163,7 @@ public class BolusCommand extends BaseCommand {
|
||||||
if (bolusRemaining != null && !Objects.equals(bolusRemaining, lastBolusReported)) {
|
if (bolusRemaining != null && !Objects.equals(bolusRemaining, lastBolusReported)) {
|
||||||
aapsLogger.debug(LTag.PUMP, "Delivering bolus, remaining: " + bolusRemaining);
|
aapsLogger.debug(LTag.PUMP, "Delivering bolus, remaining: " + bolusRemaining);
|
||||||
int percentDelivered = (int) (100 - (bolusRemaining / bolus * 100));
|
int percentDelivered = (int) (100 - (bolusRemaining / bolus * 100));
|
||||||
bolusProgressReporter.report(DELIVERING, percentDelivered, bolus - bolusRemaining);
|
bolusProgressReporter.report(BolusProgressReporter.State.DELIVERING, percentDelivered, bolus - bolusRemaining);
|
||||||
lastBolusReported = bolusRemaining;
|
lastBolusReported = bolusRemaining;
|
||||||
}
|
}
|
||||||
SystemClock.sleep(50);
|
SystemClock.sleep(50);
|
||||||
|
@ -190,7 +184,7 @@ public class BolusCommand extends BaseCommand {
|
||||||
aapsLogger.debug(LTag.PUMP, "Stage 4: bolus was cancelled, with unknown amount delivered");
|
aapsLogger.debug(LTag.PUMP, "Stage 4: bolus was cancelled, with unknown amount delivered");
|
||||||
} else {
|
} else {
|
||||||
aapsLogger.debug(LTag.PUMP, "Stage 4: full bolus of " + bolus + " U was successfully delivered");
|
aapsLogger.debug(LTag.PUMP, "Stage 4: full bolus of " + bolus + " U was successfully delivered");
|
||||||
bolusProgressReporter.report(DELIVERED, 100, bolus);
|
bolusProgressReporter.report(BolusProgressReporter.State.DELIVERED, 100, bolus);
|
||||||
}
|
}
|
||||||
result.success = true;
|
result.success = true;
|
||||||
}
|
}
|
||||||
|
@ -244,7 +238,7 @@ public class BolusCommand extends BaseCommand {
|
||||||
public void requestCancellation() {
|
public void requestCancellation() {
|
||||||
aapsLogger.debug(LTag.PUMP, "Bolus cancellation requested");
|
aapsLogger.debug(LTag.PUMP, "Bolus cancellation requested");
|
||||||
cancelRequested = true;
|
cancelRequested = true;
|
||||||
bolusProgressReporter.report(STOPPING, 0, 0);
|
bolusProgressReporter.report(BolusProgressReporter.State.STOPPING, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override @NonNull
|
@Override @NonNull
|
|
@ -1,11 +1,11 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands;
|
package info.nightscout.pump.combo.ruffyscripter.commands;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import org.monkey.d.ruffy.ruffy.driver.display.MenuType;
|
import org.monkey.d.ruffy.ruffy.driver.display.MenuType;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
import info.nightscout.pump.combo.ruffyscripter.PumpState;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes;
|
import info.nightscout.pump.combo.ruffyscripter.PumpWarningCodes;
|
||||||
import info.nightscout.rx.logging.AAPSLogger;
|
import info.nightscout.rx.logging.AAPSLogger;
|
||||||
import info.nightscout.rx.logging.LTag;
|
import info.nightscout.rx.logging.LTag;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands;
|
package info.nightscout.pump.combo.ruffyscripter.commands;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.RuffyScripter;
|
import info.nightscout.pump.combo.ruffyscripter.CommandResult;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.CommandResult;
|
import info.nightscout.pump.combo.ruffyscripter.RuffyScripter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for all commands to be executed by the pump.
|
* Interface for all commands to be executed by the pump.
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands;
|
package info.nightscout.pump.combo.ruffyscripter.commands;
|
||||||
|
|
||||||
public class CommandException extends RuntimeException {
|
public class CommandException extends RuntimeException {
|
||||||
public CommandException(String message) {
|
public CommandException(String message) {
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands;
|
package info.nightscout.pump.combo.ruffyscripter.commands;
|
||||||
|
|
||||||
public class ConfirmAlertCommand extends BaseCommand {
|
public class ConfirmAlertCommand extends BaseCommand {
|
||||||
private final int warningCode;
|
private final int warningCode;
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands;
|
package info.nightscout.pump.combo.ruffyscripter.commands;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ import org.monkey.d.ruffy.ruffy.driver.display.menu.MenuTime;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BasalProfile;
|
import info.nightscout.pump.combo.ruffyscripter.BasalProfile;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
import info.nightscout.pump.combo.ruffyscripter.PumpState;
|
||||||
import info.nightscout.rx.logging.AAPSLogger;
|
import info.nightscout.rx.logging.AAPSLogger;
|
||||||
import info.nightscout.rx.logging.LTag;
|
import info.nightscout.rx.logging.LTag;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands;
|
package info.nightscout.pump.combo.ruffyscripter.commands;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
@ -10,12 +10,12 @@ import org.monkey.d.ruffy.ruffy.driver.display.menu.MenuTime;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Bolus;
|
import info.nightscout.pump.combo.ruffyscripter.history.Bolus;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpAlert;
|
import info.nightscout.pump.combo.ruffyscripter.history.PumpAlert;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistory;
|
import info.nightscout.pump.combo.ruffyscripter.history.PumpHistory;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistoryRequest;
|
import info.nightscout.pump.combo.ruffyscripter.history.PumpHistoryRequest;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Tbr;
|
import info.nightscout.pump.combo.ruffyscripter.history.Tbr;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Tdd;
|
import info.nightscout.pump.combo.ruffyscripter.history.Tdd;
|
||||||
import info.nightscout.rx.logging.AAPSLogger;
|
import info.nightscout.rx.logging.AAPSLogger;
|
||||||
import info.nightscout.rx.logging.LTag;
|
import info.nightscout.rx.logging.LTag;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands;
|
package info.nightscout.pump.combo.ruffyscripter.commands;
|
||||||
|
|
||||||
public class ReadPumpStateCommand extends BaseCommand {
|
public class ReadPumpStateCommand extends BaseCommand {
|
||||||
@Override
|
@Override
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands;
|
package info.nightscout.pump.combo.ruffyscripter.commands;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Bolus;
|
import info.nightscout.pump.combo.ruffyscripter.history.Bolus;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistory;
|
import info.nightscout.pump.combo.ruffyscripter.history.PumpHistory;
|
||||||
import info.nightscout.rx.logging.AAPSLogger;
|
import info.nightscout.rx.logging.AAPSLogger;
|
||||||
import info.nightscout.rx.logging.LTag;
|
import info.nightscout.rx.logging.LTag;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands;
|
package info.nightscout.pump.combo.ruffyscripter.commands;
|
||||||
|
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ import org.monkey.d.ruffy.ruffy.driver.display.menu.MenuTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BasalProfile;
|
import info.nightscout.pump.combo.ruffyscripter.BasalProfile;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
import info.nightscout.pump.combo.ruffyscripter.PumpState;
|
||||||
import info.nightscout.rx.logging.AAPSLogger;
|
import info.nightscout.rx.logging.AAPSLogger;
|
||||||
import info.nightscout.rx.logging.LTag;
|
import info.nightscout.rx.logging.LTag;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands;
|
package info.nightscout.pump.combo.ruffyscripter.commands;
|
||||||
|
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
import info.nightscout.pump.combo.ruffyscripter.PumpState;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes;
|
import info.nightscout.pump.combo.ruffyscripter.PumpWarningCodes;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.WarningOrErrorCode;
|
import info.nightscout.pump.combo.ruffyscripter.WarningOrErrorCode;
|
||||||
import info.nightscout.rx.logging.AAPSLogger;
|
import info.nightscout.rx.logging.AAPSLogger;
|
||||||
import info.nightscout.rx.logging.LTag;
|
import info.nightscout.rx.logging.LTag;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history;
|
package info.nightscout.pump.combo.ruffyscripter.history;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history;
|
package info.nightscout.pump.combo.ruffyscripter.history;
|
||||||
|
|
||||||
public abstract class HistoryRecord {
|
public abstract class HistoryRecord {
|
||||||
public final long timestamp;
|
public final long timestamp;
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history;
|
package info.nightscout.pump.combo.ruffyscripter.history;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history;
|
package info.nightscout.pump.combo.ruffyscripter.history;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history;
|
package info.nightscout.pump.combo.ruffyscripter.history;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history;
|
package info.nightscout.pump.combo.ruffyscripter.history;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history;
|
package info.nightscout.pump.combo.ruffyscripter.history;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue