Read configuration for getting active basal profile instead of using status result

This commit is contained in:
TebbeUbben 2019-01-19 00:47:32 +01:00
parent f27ace7568
commit cc364a0cec

View file

@ -67,6 +67,7 @@ import info.nightscout.androidaps.plugins.PumpInsightLocal.app_layer.history.his
import info.nightscout.androidaps.plugins.PumpInsightLocal.app_layer.history.history_events.StartOfTBREvent;
import info.nightscout.androidaps.plugins.PumpInsightLocal.app_layer.history.history_events.TotalDailyDoseEvent;
import info.nightscout.androidaps.plugins.PumpInsightLocal.app_layer.history.history_events.TubeFilledEvent;
import info.nightscout.androidaps.plugins.PumpInsightLocal.app_layer.parameter_blocks.ActiveBRProfileBlock;
import info.nightscout.androidaps.plugins.PumpInsightLocal.app_layer.parameter_blocks.BRProfile1Block;
import info.nightscout.androidaps.plugins.PumpInsightLocal.app_layer.parameter_blocks.BRProfile2Block;
import info.nightscout.androidaps.plugins.PumpInsightLocal.app_layer.parameter_blocks.BRProfile3Block;
@ -335,7 +336,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
private void fetchBasalProfile() throws Exception {
Class<? extends BRProfileBlock> parameterBlock = null;
switch (activeBasalRate.getActiveBasalProfile()) {
switch (ParameterBlockUtil.readParameterBlock(connectionService, Service.CONFIGURATION, ActiveBRProfileBlock.class).getActiveBasalProfile()) {
case PROFILE_1:
parameterBlock = BRProfile1Block.class;
break;