From 441c2beffcda7391ed7a7b11507bc5444f278037 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 24 Oct 2017 09:19:03 +0200 Subject: [PATCH] read status after bolus --- .../plugins/PumpDanaRS/services/DanaRSService.java | 3 +++ .../PumpDanaRv2/services/DanaRv2ExecutionService.java | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/services/DanaRSService.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/services/DanaRSService.java index e3baf10870..399254f84b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/services/DanaRSService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRS/services/DanaRSService.java @@ -260,6 +260,9 @@ public class DanaRSService extends Service { if (!(isConnected())) DanaRSPlugin.getPlugin().connect("loadEvents"); loadEvents(); + // reread bolus status + MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingbolusstatus))); + bleComm.sendMessage(new DanaRS_Packet_Bolus_Get_Step_Bolus_Information()); // last bolus bolusingEvent.percent = 100; MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.disconnecting))); return true; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java index 75f9893bc9..6eabb668fb 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/services/DanaRv2ExecutionService.java @@ -262,13 +262,13 @@ public class DanaRv2ExecutionService extends Service { } } + MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingbolusstatus))); mSerialIOThread.sendMessage(statusMsg); mSerialIOThread.sendMessage(statusBasicMsg); MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingtempbasalstatus))); mSerialIOThread.sendMessage(tempStatusMsg); MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingextendedbolusstatus))); mSerialIOThread.sendMessage(exStatusMsg); - MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingbolusstatus))); if (!statusMsg.received) { mSerialIOThread.sendMessage(statusMsg); @@ -471,6 +471,9 @@ public class DanaRv2ExecutionService extends Service { if (!(isConnected())) connect("loadEvents"); loadEvents(); + // load last bolus status + MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.gettingbolusstatus))); + mSerialIOThread.sendMessage(new MsgStatus()); bolusingEvent.percent = 100; MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.disconnecting))); return true;