Combo: set SMB flag on bolus progress update for wear.

This commit is contained in:
Johannes Mockenhaupt 2018-03-16 15:56:31 +01:00
parent 6bebb30da0
commit 0205dc40b3
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -26,6 +26,7 @@ import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.db.CareportalEvent; import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.db.Source; import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.db.TemporaryBasal; import info.nightscout.androidaps.db.TemporaryBasal;
import info.nightscout.androidaps.db.Treatment;
import info.nightscout.androidaps.events.EventInitializationChanged; import info.nightscout.androidaps.events.EventInitializationChanged;
import info.nightscout.androidaps.events.EventRefreshOverview; import info.nightscout.androidaps.events.EventRefreshOverview;
import info.nightscout.androidaps.interfaces.ConstraintsInterface; import info.nightscout.androidaps.interfaces.ConstraintsInterface;
@ -514,6 +515,8 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
MainApp.getConfigBuilder().addToHistoryTreatment(detailedBolusInfo); MainApp.getConfigBuilder().addToHistoryTreatment(detailedBolusInfo);
EventOverviewBolusProgress bolusingEvent = EventOverviewBolusProgress.getInstance(); EventOverviewBolusProgress bolusingEvent = EventOverviewBolusProgress.getInstance();
bolusingEvent.t = new Treatment();
bolusingEvent.t.isSMB = detailedBolusInfo.isSMB;
bolusingEvent.percent = 100; bolusingEvent.percent = 100;
MainApp.bus().post(bolusingEvent); MainApp.bus().post(bolusingEvent);