PodConstants:
- Fixed type - PRIMING/CANULLA/PULSE are the same, move to one single const
This commit is contained in:
parent
30342f2e23
commit
99ae6b4b84
2 changed files with 6 additions and 10 deletions
|
@ -10,7 +10,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.G
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.*
|
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.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_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_IMMINENT_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.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.response.*
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
||||||
|
@ -281,7 +281,7 @@ class OmnipodDashManagerImpl @Inject constructor(
|
||||||
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||||
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
.setNonce(NONCE)
|
.setNonce(NONCE)
|
||||||
.setNumberOfUnits(podStateManager.firstPrimeBolusVolume!! * PodConstants.POD_PRIMING_BOLUS_UNITS)
|
.setNumberOfUnits(podStateManager.firstPrimeBolusVolume!! * PodConstants.POD_PULSE_BOLUS_UNITS)
|
||||||
.setDelayBetweenPulsesInEighthSeconds(podStateManager.primePulseRate!!.toByte())
|
.setDelayBetweenPulsesInEighthSeconds(podStateManager.primePulseRate!!.toByte())
|
||||||
.setProgramReminder(ProgramReminder(atStart = false, atEnd = false, atInterval = 0))
|
.setProgramReminder(ProgramReminder(atStart = false, atEnd = false, atInterval = 0))
|
||||||
.build(),
|
.build(),
|
||||||
|
@ -383,7 +383,7 @@ class OmnipodDashManagerImpl @Inject constructor(
|
||||||
)
|
)
|
||||||
observables.add(
|
observables.add(
|
||||||
observeSendProgramBolusCommand(
|
observeSendProgramBolusCommand(
|
||||||
podStateManager.secondPrimeBolusVolume!! * PodConstants.POD_CANNULA_INSERTION_BOLUS_UNITS,
|
podStateManager.secondPrimeBolusVolume!! * PodConstants.POD_PULSE_BOLUS_UNITS,
|
||||||
podStateManager.primePulseRate!!.toByte(),
|
podStateManager.primePulseRate!!.toByte(),
|
||||||
confirmationBeeps = false,
|
confirmationBeeps = false,
|
||||||
completionBeeps = false
|
completionBeeps = false
|
||||||
|
@ -408,7 +408,7 @@ class OmnipodDashManagerImpl @Inject constructor(
|
||||||
enabled = true,
|
enabled = true,
|
||||||
durationInMinutes = 0,
|
durationInMinutes = 0,
|
||||||
autoOff = false,
|
autoOff = false,
|
||||||
AlertTrigger.TimerTrigger(POD_EXPIRATION_EMINENT_ALERT_MINUTES.toShort()), // FIXME use activation time
|
AlertTrigger.TimerTrigger(POD_EXPIRATION_IMMINENT_ALERT_MINUTES.toShort()), // FIXME use activation time
|
||||||
BeepType.FOUR_TIMES_BIP_BEEP,
|
BeepType.FOUR_TIMES_BIP_BEEP,
|
||||||
BeepRepetitionType.XXX4
|
BeepRepetitionType.XXX4
|
||||||
)
|
)
|
||||||
|
|
|
@ -12,15 +12,11 @@ class PodConstants {
|
||||||
// Expiration alert time in minutes since activation
|
// Expiration alert time in minutes since activation
|
||||||
const val POD_EXPIRATION_ALERT_MINUTES = 60 * 72
|
const val POD_EXPIRATION_ALERT_MINUTES = 60 * 72
|
||||||
// Expiration eminent alert time in minutes since activation
|
// Expiration eminent alert time in minutes since activation
|
||||||
const val POD_EXPIRATION_EMINENT_ALERT_MINUTES = 60 * 79
|
const val POD_EXPIRATION_IMMINENT_ALERT_MINUTES = 60 * 79
|
||||||
|
|
||||||
// Bolus units
|
// Bolus & Priming units
|
||||||
const val POD_PULSE_BOLUS_UNITS = 0.05
|
const val POD_PULSE_BOLUS_UNITS = 0.05
|
||||||
|
|
||||||
// Priming units
|
|
||||||
const val POD_PRIMING_BOLUS_UNITS = 0.05
|
|
||||||
const val POD_CANNULA_INSERTION_BOLUS_UNITS = 0.05
|
|
||||||
|
|
||||||
// Reservoir units alert threshold
|
// Reservoir units alert threshold
|
||||||
const val DEFAULT_MAX_RESERVOIR_ALERT_THRESHOLD : Short = 20
|
const val DEFAULT_MAX_RESERVOIR_ALERT_THRESHOLD : Short = 20
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue