Merge branch 'smb-source' into 'smb'

Set Source.USER for SMB to deliver.

See merge request !363
This commit is contained in:
Milos Kozak 2017-09-13 11:21:27 +00:00
commit 1bd938c8d5

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;