Early return on setBolus failure
This commit is contained in:
parent
94e6189ab3
commit
345ae0f9b2
1 changed files with 5 additions and 0 deletions
|
@ -286,6 +286,11 @@ class MedtrumService : DaggerService(), BLECommCallback {
|
||||||
if (!isConnected) return false
|
if (!isConnected) return false
|
||||||
val insulin = detailedBolusInfo.insulin
|
val insulin = detailedBolusInfo.insulin
|
||||||
val result = sendPacketAndGetResponse(SetBolusPacket(injector, insulin))
|
val result = sendPacketAndGetResponse(SetBolusPacket(injector, insulin))
|
||||||
|
if (result == false) {
|
||||||
|
aapsLogger.error(LTag.PUMPCOMM, "Failed to set bolus")
|
||||||
|
commandQueue.loadEvents(null) // make sure if anything is delivered (which is highly unlikely at this point) we get it
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
val bolusStart = System.currentTimeMillis()
|
val bolusStart = System.currentTimeMillis()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue