Insert Announcement on pump alarm

This commit is contained in:
jbr7rr 2023-07-17 19:10:09 +02:00
parent 2b86cb2dbf
commit 6a6af81ef7

View file

@ -449,6 +449,12 @@ class MedtrumService : DaggerService(), BLECommCallback {
}
if (alarmState != null && alarmState != AlarmState.NONE) {
medtrumPump.addAlarm(alarmState)
pumpSync.insertAnnouncement(
medtrumPump.alarmStateToString(alarmState),
null,
medtrumPump.pumpType(),
medtrumPump.pumpSN.toString(radix = 16)
)
}
// Map the pump state to a notification