From 5f1ab4e45cf47268469247db5c6f8764ae28f7cf Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Fri, 14 Jul 2017 14:15:35 +0200 Subject: [PATCH] Set duration in PumpEnactResult when issuing SetTbrCommand. --- .../nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java index 557b2caae4..da1097152a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java @@ -248,6 +248,8 @@ public class ComboPlugin implements PluginBase, PumpInterface { pumpEnactResult.success = commandResult.success; pumpEnactResult.enacted = commandResult.enacted; pumpEnactResult.comment = commandResult.message; + // Combo would have bailed if this wasn't set properly. Maybe we should + // have the command return this anyways ... pumpEnactResult.bolusDelivered = detailedBolusInfo.insulin; return pumpEnactResult; } finally { @@ -280,7 +282,10 @@ public class ComboPlugin implements PluginBase, PumpInterface { pumpEnactResult.enacted = commandResult.enacted; pumpEnactResult.comment = commandResult.message; pumpEnactResult.isPercent = true; + // Combo would have bailed if this wasn't set properly. Maybe we should + // have the command return this anyways ... pumpEnactResult.percent = percent; + pumpEnactResult.duration = durationInMinutes; return pumpEnactResult; } finally { ruffyScripter.disconnect();