Set duration in PumpEnactResult when issuing SetTbrCommand.

This commit is contained in:
Johannes Mockenhaupt 2017-07-14 14:15:35 +02:00
parent 6842abd157
commit 5f1ab4e45c
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -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();