alert on suspend. don't use DST for timezone name

This commit is contained in:
Andrei Vereha 2021-08-01 23:02:47 +02:00
parent 26321344eb
commit a77a0b21fb
3 changed files with 12 additions and 2 deletions

View file

@ -412,7 +412,16 @@ class OmnipodDashManagerImpl @Inject constructor(
), // FIXME use activation time
BeepType.FOUR_TIMES_BIP_BEEP,
BeepRepetitionType.XXX4
)
),
AlertConfiguration(
AlertType.SUSPEND_IN_PROGRESS,
enabled = true,
durationInMinutes = 15,
autoOff = false,
AlertTrigger.TimerTrigger(15),
BeepType.XXX,
BeepRepetitionType.XXX4
),
)
val userExpiryAlertDelay = podLifeLeft.minus(
Duration.ofHours(userConfiguredExpirationHours ?: MAX_POD_LIFETIME.toHours() + 1)

View file

@ -4,5 +4,6 @@ enum class BeepType(val value: Byte) {
SILENT(0x00.toByte()),
FOUR_TIMES_BIP_BEEP(0x02.toByte()), // Used in low reservoir alert, user expiration alert, expiration alert, imminent expiration alert, lump of coal alert
XXX(0x04.toByte()), // Used during suspend
LONG_SINGLE_BEEP(0x06.toByte()); // Used in stop delivery command
}

View file

@ -117,7 +117,7 @@ class OmnipodDashPodStateManagerImpl @Inject constructor(
override var timeZone: TimeZone
get() = TimeZone.getTimeZone(podState.timeZone)
set(tz) {
podState.timeZone = tz.getDisplayName(true, TimeZone.SHORT)
podState.timeZone = tz.getDisplayName(false, TimeZone.SHORT)
store()
}