Move fixed values for expiration alerts to PodConstants
This commit is contained in:
parent
5ffe61d6c4
commit
30342f2e23
|
@ -9,6 +9,9 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.*
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.GetVersionCommand.Companion.DEFAULT_UNIQUE_ID
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.*
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.MAX_POD_LIFETIME
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.POD_EXPIRATION_ALERT_MINUTES_DURATION
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.POD_EXPIRATION_EMINENT_ALERT_MINUTES
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.POD_EXPIRATION_ALERT_MINUTES
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.*
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
||||
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
||||
|
@ -394,11 +397,9 @@ class OmnipodDashManagerImpl @Inject constructor(
|
|||
AlertConfiguration(
|
||||
AlertType.EXPIRATION,
|
||||
enabled = true,
|
||||
durationInMinutes = TimeUnit.HOURS.toMinutes(7).toShort(),
|
||||
durationInMinutes = POD_EXPIRATION_ALERT_MINUTES_DURATION.toShort(),
|
||||
autoOff = false,
|
||||
AlertTrigger.TimerTrigger(
|
||||
TimeUnit.HOURS.toMinutes(72).toShort()
|
||||
), // FIXME use activation time
|
||||
AlertTrigger.TimerTrigger(POD_EXPIRATION_ALERT_MINUTES.toShort()), // FIXME use activation time
|
||||
BeepType.FOUR_TIMES_BIP_BEEP,
|
||||
BeepRepetitionType.XXX3
|
||||
),
|
||||
|
@ -407,9 +408,7 @@ class OmnipodDashManagerImpl @Inject constructor(
|
|||
enabled = true,
|
||||
durationInMinutes = 0,
|
||||
autoOff = false,
|
||||
AlertTrigger.TimerTrigger(
|
||||
TimeUnit.HOURS.toMinutes(79).toShort()
|
||||
), // FIXME use activation time
|
||||
AlertTrigger.TimerTrigger(POD_EXPIRATION_EMINENT_ALERT_MINUTES.toShort()), // FIXME use activation time
|
||||
BeepType.FOUR_TIMES_BIP_BEEP,
|
||||
BeepRepetitionType.XXX4
|
||||
)
|
||||
|
|
|
@ -1,16 +1,27 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition
|
||||
|
||||
import java.time.Duration
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class PodConstants {
|
||||
companion object {
|
||||
val MAX_POD_LIFETIME : Duration = Duration.ofHours(80)
|
||||
|
||||
// Expiration alerts duration in minutes
|
||||
const val POD_EXPIRATION_ALERT_MINUTES_DURATION = 60 * 7
|
||||
// Expiration alert time in minutes since activation
|
||||
const val POD_EXPIRATION_ALERT_MINUTES = 60 * 72
|
||||
// Expiration eminent alert time in minutes since activation
|
||||
const val POD_EXPIRATION_EMINENT_ALERT_MINUTES = 60 * 79
|
||||
|
||||
// Bolus units
|
||||
const val POD_PULSE_BOLUS_UNITS = 0.05
|
||||
// Priming
|
||||
|
||||
// Priming units
|
||||
const val POD_PRIMING_BOLUS_UNITS = 0.05
|
||||
const val POD_CANNULA_INSERTION_BOLUS_UNITS = 0.05
|
||||
// Reservoir
|
||||
|
||||
// Reservoir units alert threshold
|
||||
const val DEFAULT_MAX_RESERVOIR_ALERT_THRESHOLD : Short = 20
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue