diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/comm/MsgStatus.java b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/comm/MsgStatus.java index 793ce408fb..e86e3cf8c8 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/comm/MsgStatus.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/comm/MsgStatus.java @@ -20,8 +20,11 @@ public class MsgStatus extends DanaRMessage { DanaRFragment.getDanaRPump().isExtendedInProgress = intFromBuff(bytes, 3, 1) == 1; DanaRFragment.getDanaRPump().extendedBolusMinutes = intFromBuff(bytes, 4, 2); DanaRFragment.getDanaRPump().extendedBolusAmount = intFromBuff(bytes, 6, 2) / 100d; - DanaRFragment.getDanaRPump().lastBolusTime = dateTimeFromBuff(bytes, 8); - DanaRFragment.getDanaRPump().lastBolusAmount = intFromBuff(bytes, 13, 2) / 100d; + Double lastBolusAmount = intFromBuff(bytes, 13, 2) / 100d; + if (lastBolusAmount != 0d) { + DanaRFragment.getDanaRPump().lastBolusTime = dateTimeFromBuff(bytes, 8); + DanaRFragment.getDanaRPump().lastBolusAmount = lastBolusAmount; + } DanaRFragment.getDanaRPump().iob = intFromBuff(bytes, 15, 2) / 100d; if (Config.logDanaMessageDetail) {