From 1b38c9cf5e81f406c9e4d6eb2d26ceee443ed92c Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Sat, 17 Mar 2018 13:43:25 +0100 Subject: [PATCH] Join pumps under Config.HWPUMPS switch. --- .../main/java/info/nightscout/androidaps/Config.java | 3 +-- .../main/java/info/nightscout/androidaps/MainApp.java | 10 +++++----- .../nightscout/androidaps/PreferencesActivity.java | 4 +--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/Config.java b/app/src/main/java/info/nightscout/androidaps/Config.java index 66f284506f..a2bf64b7ae 100644 --- a/app/src/main/java/info/nightscout/androidaps/Config.java +++ b/app/src/main/java/info/nightscout/androidaps/Config.java @@ -13,8 +13,7 @@ public class Config { public static final boolean G5UPLOADER = BuildConfig.G5UPLOADER; public static final boolean PUMPCONTROL = BuildConfig.PUMPCONTROL; - public static final boolean COMBO = true && BuildConfig.PUMPDRIVERS; - public static final boolean DANAR = BuildConfig.PUMPDRIVERS; + public static final boolean HWPUMPS = BuildConfig.PUMPDRIVERS; public static final boolean ACTION = !BuildConfig.NSCLIENTOLNY && !BuildConfig.G5UPLOADER; public static final boolean VIRTUALPUMP = !BuildConfig.NSCLIENTOLNY && !BuildConfig.G5UPLOADER; diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.java b/app/src/main/java/info/nightscout/androidaps/MainApp.java index 7c9685c8f5..ee6bb2bbfc 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainApp.java +++ b/app/src/main/java/info/nightscout/androidaps/MainApp.java @@ -136,11 +136,11 @@ public class MainApp extends Application { pluginsList.add(SensitivityOref0Plugin.getPlugin()); pluginsList.add(SensitivityAAPSPlugin.getPlugin()); pluginsList.add(SensitivityWeightedAveragePlugin.getPlugin()); - if (Config.DANAR) pluginsList.add(DanaRPlugin.getPlugin()); - if (Config.DANAR) pluginsList.add(DanaRKoreanPlugin.getPlugin()); - if (Config.DANAR) pluginsList.add(DanaRv2Plugin.getPlugin()); - if (Config.DANAR) pluginsList.add(DanaRSPlugin.getPlugin()); - if (Config.COMBO) pluginsList.add(ComboPlugin.getPlugin()); + if (Config.HWPUMPS) pluginsList.add(DanaRPlugin.getPlugin()); + if (Config.HWPUMPS) pluginsList.add(DanaRKoreanPlugin.getPlugin()); + if (Config.HWPUMPS) pluginsList.add(DanaRv2Plugin.getPlugin()); + if (Config.HWPUMPS) pluginsList.add(DanaRSPlugin.getPlugin()); + if (Config.HWPUMPS) pluginsList.add(ComboPlugin.getPlugin()); pluginsList.add(CareportalPlugin.getPlugin()); // if (Config.DANAR) pluginsList.add(InsightPumpPlugin.getPlugin()); // <-- Enable Insight plugin here if (Config.MDI) pluginsList.add(MDIPlugin.getPlugin()); diff --git a/app/src/main/java/info/nightscout/androidaps/PreferencesActivity.java b/app/src/main/java/info/nightscout/androidaps/PreferencesActivity.java index 4364dad257..0f712c787f 100644 --- a/app/src/main/java/info/nightscout/androidaps/PreferencesActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/PreferencesActivity.java @@ -1,6 +1,5 @@ package info.nightscout.androidaps; -import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.EditTextPreference; @@ -23,7 +22,6 @@ import info.nightscout.androidaps.plugins.Loop.LoopPlugin; import info.nightscout.androidaps.plugins.NSClientInternal.NSClientInternalPlugin; import info.nightscout.androidaps.plugins.OpenAPSAMA.OpenAPSAMAPlugin; import info.nightscout.androidaps.plugins.OpenAPSMA.OpenAPSMAPlugin; -import info.nightscout.androidaps.plugins.PumpCombo.ComboPlugin; import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPlugin; import info.nightscout.androidaps.plugins.PumpDanaRKorean.DanaRKoreanPlugin; import info.nightscout.androidaps.plugins.PumpDanaRS.DanaRSPlugin; @@ -155,7 +153,7 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre addPreferencesFromResourceIfEnabled(SensitivityWeightedAveragePlugin.getPlugin(), PluginBase.SENSITIVITY); addPreferencesFromResourceIfEnabled(SensitivityOref0Plugin.getPlugin(), PluginBase.SENSITIVITY); - if (Config.DANAR) { + if (Config.HWPUMPS) { addPreferencesFromResourceIfEnabled(DanaRPlugin.getPlugin(), PluginBase.PUMP); addPreferencesFromResourceIfEnabled(DanaRKoreanPlugin.getPlugin(), PluginBase.PUMP); addPreferencesFromResourceIfEnabled(DanaRv2Plugin.getPlugin(), PluginBase.PUMP);