Set Source.USER for SMB to deliver.

This commit is contained in:
Johannes Mockenhaupt 2017-09-13 13:18:57 +02:00
parent 01a93a35b9
commit a4ebd15dbf
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -30,6 +30,7 @@ import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.db.ExtendedBolus;
import info.nightscout.androidaps.db.ProfileSwitch;
import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.db.TempTarget;
import info.nightscout.androidaps.db.TemporaryBasal;
import info.nightscout.androidaps.db.Treatment;
@ -601,6 +602,7 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
detailedBolusInfo.eventType = CareportalEvent.CORRECTIONBOLUS;
detailedBolusInfo.insulin = request.smb;
detailedBolusInfo.isSMB = true;
detailedBolusInfo.source = Source.USER;
PumpEnactResult smbResult = deliverTreatment(detailedBolusInfo);
if (smbResult.success)
return result;