From 8ad5f53f7afa6c3259c60ed369ad8752be366e71 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 15 Mar 2020 19:25:24 +0100 Subject: [PATCH] DanaRv2ExecutionService --- .../pump/danaRv2/services/DanaRv2ExecutionService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/services/DanaRv2ExecutionService.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/services/DanaRv2ExecutionService.java index f06c694299..03adcdb4db 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/services/DanaRv2ExecutionService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/services/DanaRv2ExecutionService.java @@ -31,7 +31,7 @@ import info.nightscout.androidaps.logging.LTag; import info.nightscout.androidaps.plugins.bus.RxBusWrapper; import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin; import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker; -import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions; +import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction; import info.nightscout.androidaps.plugins.general.nsclient.NSUpload; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress; @@ -105,6 +105,7 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService { @Inject MessageHashTableRv2 messageHashTableRv2; @Inject DetailedBolusInfoStorage detailedBolusInfoStorage; @Inject TreatmentsPlugin treatmentsPlugin; + @Inject ProfileFunction profileFunction; private CompositeDisposable disposable = new CompositeDisposable(); @@ -213,7 +214,7 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService { danaRPump.setLastConnection(System.currentTimeMillis()); - Profile profile = ProfileFunctions.getInstance().getProfile(); + Profile profile = profileFunction.getProfile(); PumpInterface pump = ConfigBuilderPlugin.getPlugin().getActivePump(); if (profile != null && Math.abs(danaRPump.getCurrentBasal() - profile.getBasal()) >= pump.getPumpDescription().basalStep) { rxBus.send(new EventPumpStatusChanged(resourceHelper.gs(R.string.gettingpumpsettings)));