adjusting nsclient mode
This commit is contained in:
parent
b40cf99201
commit
1702ce7702
18 changed files with 69 additions and 36 deletions
|
@ -11,15 +11,15 @@ public class Config {
|
|||
public static final boolean LOOPENABLED = APS;
|
||||
public static final boolean WEAR = BuildConfig.WEAR;
|
||||
|
||||
public static final boolean NSCLIENT = BuildConfig.NSCLIENTOLNY;
|
||||
|
||||
public static final boolean DANAR = true && BuildConfig.PUMPDRIVERS;
|
||||
public static final boolean DANARv2 = true;
|
||||
public static final boolean DANARv2 = true && BuildConfig.PUMPDRIVERS;
|
||||
|
||||
public static final boolean ACTION = !BuildConfig.NSCLIENTOLNY;
|
||||
public static final boolean VIRTUALPUMP = !BuildConfig.NSCLIENTOLNY;
|
||||
public static final boolean MDI = !BuildConfig.NSCLIENTOLNY;
|
||||
public static final boolean OTHERPROFILES = !BuildConfig.NSCLIENTOLNY;
|
||||
public static final boolean TEMPBASALS = !BuildConfig.NSCLIENTOLNY;
|
||||
public static final boolean SAFETY = !BuildConfig.NSCLIENTOLNY;
|
||||
|
||||
public static final boolean SMSCOMMUNICATORENABLED = !BuildConfig.NSCLIENTOLNY;
|
||||
|
|
|
@ -19,7 +19,6 @@ import android.support.v4.view.ViewPager;
|
|||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.PopupMenu;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.MotionEvent;
|
||||
|
@ -296,7 +295,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
|
|||
case R.id.nav_about:
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(v.getContext());
|
||||
builder.setTitle(getString(R.string.app_name) + " " + BuildConfig.VERSION);
|
||||
if (BuildConfig.NSCLIENTOLNY)
|
||||
if (Config.NSCLIENT)
|
||||
builder.setIcon(R.mipmap.yellowowl);
|
||||
else
|
||||
builder.setIcon(R.mipmap.blueowl);
|
||||
|
|
|
@ -114,10 +114,13 @@ public class MainApp extends Application {
|
|||
pluginsList.add(TreatmentsFragment.getPlugin());
|
||||
if (Config.SAFETY) pluginsList.add(SafetyFragment.getPlugin());
|
||||
if (Config.APS) pluginsList.add(ObjectivesFragment.getPlugin());
|
||||
pluginsList.add(SourceXdripFragment.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceXdripFragment.getPlugin());
|
||||
pluginsList.add(SourceNSClientFragment.getPlugin());
|
||||
pluginsList.add(SourceMM640gFragment.getPlugin());
|
||||
pluginsList.add(SourceGlimpFragment.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceMM640gFragment.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceGlimpFragment.getPlugin());
|
||||
if (Config.SMSCOMMUNICATORENABLED) pluginsList.add(SmsCommunicatorFragment.getPlugin());
|
||||
|
||||
if (Config.WEAR) pluginsList.add(WearFragment.getPlugin(this));
|
||||
|
|
|
@ -66,8 +66,8 @@ public class ProfileStore {
|
|||
JSONObject store = json.getJSONObject("store");
|
||||
if (store.has(profileName)) {
|
||||
String units = null;
|
||||
if (store.has("units"))
|
||||
units = store.getString("units");
|
||||
if (json.has("units"))
|
||||
units = json.getString("units");
|
||||
profile = new Profile(store.getJSONObject(profileName), units);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package info.nightscout.androidaps.plugins.Careportal;
|
||||
|
||||
import info.nightscout.androidaps.Config;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
|
@ -57,7 +58,7 @@ public class CareportalPlugin implements PluginBase {
|
|||
|
||||
@Override
|
||||
public boolean showInList(int type) {
|
||||
return true;
|
||||
return !Config.NSCLIENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -50,12 +50,15 @@ public class ConfigBuilderFragment extends Fragment {
|
|||
|
||||
ListView insulinListView;
|
||||
ListView bgsourceListView;
|
||||
TextView bgsourceLabel;
|
||||
ListView pumpListView;
|
||||
TextView pumpLabel;
|
||||
ListView loopListView;
|
||||
TextView loopLabel;
|
||||
ListView treatmentsListView;
|
||||
TextView treatmentsLabel;
|
||||
ListView profileListView;
|
||||
TextView profileLabel;
|
||||
ListView apsListView;
|
||||
TextView apsLabel;
|
||||
ListView constraintsListView;
|
||||
|
@ -94,12 +97,15 @@ public class ConfigBuilderFragment extends Fragment {
|
|||
|
||||
insulinListView = (ListView) view.findViewById(R.id.configbuilder_insulinlistview);
|
||||
bgsourceListView = (ListView) view.findViewById(R.id.configbuilder_bgsourcelistview);
|
||||
bgsourceLabel = (TextView) view.findViewById(R.id.configbuilder_bgsourcelabel);
|
||||
pumpListView = (ListView) view.findViewById(R.id.configbuilder_pumplistview);
|
||||
pumpLabel = (TextView) view.findViewById(R.id.configbuilder_pumplabel);
|
||||
loopListView = (ListView) view.findViewById(R.id.configbuilder_looplistview);
|
||||
loopLabel = (TextView) view.findViewById(R.id.configbuilder_looplabel);
|
||||
treatmentsListView = (ListView) view.findViewById(R.id.configbuilder_treatmentslistview);
|
||||
treatmentsLabel = (TextView) view.findViewById(R.id.configbuilder_treatmentslabel);
|
||||
profileListView = (ListView) view.findViewById(R.id.configbuilder_profilelistview);
|
||||
profileLabel = (TextView) view.findViewById(R.id.configbuilder_profilelabel);
|
||||
apsListView = (ListView) view.findViewById(R.id.configbuilder_apslistview);
|
||||
apsLabel = (TextView) view.findViewById(R.id.configbuilder_apslabel);
|
||||
constraintsListView = (ListView) view.findViewById(R.id.configbuilder_constraintslistview);
|
||||
|
@ -144,6 +150,8 @@ public class ConfigBuilderFragment extends Fragment {
|
|||
setListViewHeightBasedOnChildren(insulinListView);
|
||||
bgsourceDataAdapter = new PluginCustomAdapter(getContext(), smallWidth?R.layout.configbuilder_smallitem :R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsVisibleInListByInterface(BgSourceInterface.class, PluginBase.BGSOURCE), PluginBase.BGSOURCE);
|
||||
bgsourceListView.setAdapter(bgsourceDataAdapter);
|
||||
if (MainApp.getSpecificPluginsVisibleInList(PluginBase.BGSOURCE).size() == 0)
|
||||
bgsourceLabel.setVisibility(View.GONE);
|
||||
setListViewHeightBasedOnChildren(bgsourceListView);
|
||||
pumpDataAdapter = new PluginCustomAdapter(getContext(), smallWidth?R.layout.configbuilder_smallitem :R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsVisibleInList(PluginBase.PUMP), PluginBase.PUMP);
|
||||
pumpListView.setAdapter(pumpDataAdapter);
|
||||
|
@ -157,9 +165,13 @@ public class ConfigBuilderFragment extends Fragment {
|
|||
loopLabel.setVisibility(View.GONE);
|
||||
treatmentsDataAdapter = new PluginCustomAdapter(getContext(), smallWidth?R.layout.configbuilder_smallitem :R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsVisibleInList(PluginBase.TREATMENT), PluginBase.TREATMENT);
|
||||
treatmentsListView.setAdapter(treatmentsDataAdapter);
|
||||
if (MainApp.getSpecificPluginsVisibleInList(PluginBase.TREATMENT).size() == 0)
|
||||
treatmentsLabel.setVisibility(View.GONE);
|
||||
setListViewHeightBasedOnChildren(treatmentsListView);
|
||||
profileDataAdapter = new PluginCustomAdapter(getContext(), smallWidth?R.layout.configbuilder_smallitem :R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsVisibleInListByInterface(ProfileInterface.class, PluginBase.BGSOURCE), PluginBase.PROFILE);
|
||||
profileListView.setAdapter(profileDataAdapter);
|
||||
if (MainApp.getSpecificPluginsVisibleInList(PluginBase.PROFILE).size() == 0)
|
||||
profileLabel.setVisibility(View.GONE);
|
||||
setListViewHeightBasedOnChildren(profileListView);
|
||||
apsDataAdapter = new PluginCustomAdapter(getContext(), smallWidth?R.layout.configbuilder_smallitem :R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsVisibleInList(PluginBase.APS), PluginBase.APS);
|
||||
apsListView.setAdapter(apsDataAdapter);
|
||||
|
|
|
@ -22,6 +22,9 @@ import info.nightscout.androidaps.R;
|
|||
import info.nightscout.androidaps.data.DetailedBolusInfo;
|
||||
import info.nightscout.androidaps.data.IobTotal;
|
||||
import info.nightscout.androidaps.data.MealData;
|
||||
import info.nightscout.androidaps.data.OverlappingIntervals;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.data.ProfileIntervals;
|
||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||
import info.nightscout.androidaps.db.ExtendedBolus;
|
||||
import info.nightscout.androidaps.db.ProfileSwitch;
|
||||
|
@ -40,15 +43,12 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
|
|||
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
|
||||
import info.nightscout.androidaps.plugins.Loop.APSResult;
|
||||
import info.nightscout.androidaps.plugins.Loop.LoopPlugin;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.plugins.Overview.Dialogs.BolusProgressDialog;
|
||||
import info.nightscout.androidaps.plugins.Overview.Notification;
|
||||
import info.nightscout.androidaps.plugins.Overview.events.EventDismissBolusprogressIfRunning;
|
||||
import info.nightscout.androidaps.plugins.Overview.events.EventDismissNotification;
|
||||
import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification;
|
||||
import info.nightscout.utils.NSUpload;
|
||||
import info.nightscout.androidaps.data.OverlappingIntervals;
|
||||
import info.nightscout.androidaps.data.ProfileIntervals;
|
||||
|
||||
/**
|
||||
* Created by mike on 05.08.2016.
|
||||
|
@ -679,6 +679,8 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
|||
|
||||
@Override
|
||||
public boolean isFakingTempsByExtendedBoluses() {
|
||||
if (Config.NSCLIENT)
|
||||
return false;
|
||||
return activePump.isFakingTempsByExtendedBoluses();
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ import info.nightscout.androidaps.Config;
|
|||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.data.IobTotal;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.db.BgReading;
|
||||
import info.nightscout.androidaps.db.Treatment;
|
||||
import info.nightscout.androidaps.events.EventNewBG;
|
||||
|
@ -27,7 +28,6 @@ import info.nightscout.androidaps.events.EventNewBasalProfile;
|
|||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
import info.nightscout.androidaps.plugins.IobCobCalculator.events.EventAutosensCalculationFinished;
|
||||
import info.nightscout.androidaps.plugins.IobCobCalculator.events.EventNewHistoryData;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.utils.Round;
|
||||
import info.nightscout.utils.SP;
|
||||
import info.nightscout.utils.SafeParse;
|
||||
|
@ -232,7 +232,6 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
|||
return; // app still initializing
|
||||
//log.debug("Locking calculateSensitivityData");
|
||||
synchronized (dataLock) {
|
||||
Profile profile = MainApp.getConfigBuilder().getProfile();
|
||||
|
||||
if (bucketed_data == null || bucketed_data.size() < 3) {
|
||||
log.debug("calculateSensitivityData: No bucketed data available");
|
||||
|
@ -247,6 +246,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
|||
// check if data already exists
|
||||
long bgTime = bucketed_data.get(i).date;
|
||||
bgTime = roundUpTime(bgTime);
|
||||
Profile profile = MainApp.getConfigBuilder().getProfile(bgTime);
|
||||
|
||||
AutosensData existing;
|
||||
if ((existing = autosensDataTable.get(bgTime)) != null) {
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import info.nightscout.androidaps.Config;
|
||||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
|
@ -115,7 +116,7 @@ public class NSClientInternalPlugin implements PluginBase {
|
|||
|
||||
@Override
|
||||
public boolean showInList(int type) {
|
||||
return true;
|
||||
return !Config.NSCLIENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,6 +29,7 @@ import java.util.Date;
|
|||
import info.nightscout.androidaps.Config;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.data.ProfileStore;
|
||||
import info.nightscout.androidaps.db.DbRequest;
|
||||
import info.nightscout.androidaps.events.EventAppExit;
|
||||
import info.nightscout.androidaps.events.EventConfigBuilderChange;
|
||||
|
@ -50,7 +51,6 @@ import info.nightscout.androidaps.plugins.NSClientInternal.data.NSCal;
|
|||
import info.nightscout.androidaps.plugins.NSClientInternal.data.NSSgv;
|
||||
import info.nightscout.androidaps.plugins.NSClientInternal.data.NSStatus;
|
||||
import info.nightscout.androidaps.plugins.NSClientInternal.data.NSTreatment;
|
||||
import info.nightscout.androidaps.data.ProfileStore;
|
||||
import info.nightscout.androidaps.plugins.NSClientInternal.events.EventNSClientNewLog;
|
||||
import info.nightscout.androidaps.plugins.NSClientInternal.events.EventNSClientRestart;
|
||||
import info.nightscout.androidaps.plugins.NSClientInternal.events.EventNSClientStatus;
|
||||
|
|
|
@ -61,6 +61,7 @@ import java.util.concurrent.ScheduledExecutorService;
|
|||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import info.nightscout.androidaps.BuildConfig;
|
||||
import info.nightscout.androidaps.Config;
|
||||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
|
@ -955,7 +956,12 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
tempTargetView.setTextColor(Color.BLACK);
|
||||
tempTargetView.setBackgroundColor(MainApp.sResources.getColor(R.color.tempTargetBackground));
|
||||
tempTargetView.setVisibility(View.VISIBLE);
|
||||
tempTargetView.setText(Profile.toUnitsString(tempTarget.low, Profile.fromMgdlToUnits(tempTarget.low, profile.getUnits()), profile.getUnits()) + " - " + Profile.toUnitsString(tempTarget.high, Profile.fromMgdlToUnits(tempTarget.high, profile.getUnits()), profile.getUnits()));
|
||||
if (tempTarget.low == tempTarget.high)
|
||||
tempTargetView.setText(Profile.toUnitsString(tempTarget.low, Profile.fromMgdlToUnits(tempTarget.low, profile.getUnits()), profile.getUnits()));
|
||||
else
|
||||
tempTargetView.setText(Profile.toUnitsString(tempTarget.low, Profile.fromMgdlToUnits(tempTarget.low, profile.getUnits()), profile.getUnits()) + " - " + Profile.toUnitsString(tempTarget.high, Profile.fromMgdlToUnits(tempTarget.high, profile.getUnits()), profile.getUnits()));
|
||||
} if (Config.NSCLIENT) {
|
||||
tempTargetView.setVisibility(View.GONE);
|
||||
} else {
|
||||
|
||||
Double maxBgDefault = Constants.MAX_BG_DEFAULT_MGDL;
|
||||
|
@ -984,7 +990,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
}
|
||||
|
||||
// **** Calibration button ****
|
||||
if (MainApp.getSpecificPlugin(SourceXdripPlugin.class).isEnabled(PluginBase.BGSOURCE) && profile != null && DatabaseHelper.actualBg() != null) {
|
||||
if (MainApp.getSpecificPlugin(SourceXdripPlugin.class) != null && MainApp.getSpecificPlugin(SourceXdripPlugin.class).isEnabled(PluginBase.BGSOURCE) && profile != null && DatabaseHelper.actualBg() != null) {
|
||||
calibrationButton.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
calibrationButton.setVisibility(View.GONE);
|
||||
|
@ -1000,10 +1006,12 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
|
||||
String basalText = "";
|
||||
if (activeTemp != null) {
|
||||
basalText = activeTemp.toString() + " - ";
|
||||
basalText = activeTemp.toString() + " ";
|
||||
}
|
||||
if (pump.getPumpDescription().isTempBasalCapable) {
|
||||
basalText += DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + " U/h";
|
||||
if (Config.NSCLIENT)
|
||||
basalText += "( " + DecimalFormatter.to2Decimal(MainApp.getConfigBuilder().getProfile().getBasal()) + " U/h )";
|
||||
else if (pump.getPumpDescription().isTempBasalCapable) {
|
||||
basalText += "( " + DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + " U/h )";
|
||||
}
|
||||
baseBasalView.setText(basalText);
|
||||
|
||||
|
@ -1202,7 +1210,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
double lastTempBasal = 0;
|
||||
for (long time = fromTime; time < now; time += 1 * 60 * 1000L) {
|
||||
TemporaryBasal tb = MainApp.getConfigBuilder().getTempBasalFromHistory(time);
|
||||
double baseBasalValue = profile.getBasal(Profile.secondsFromMidnight(new Date(time)));
|
||||
double baseBasalValue = MainApp.getConfigBuilder().getProfile(time).getBasal(Profile.secondsFromMidnight(time));
|
||||
double baseLineValue = baseBasalValue;
|
||||
double tempBasalValue = 0;
|
||||
double basal = 0d;
|
||||
|
|
|
@ -14,10 +14,10 @@ import info.nightscout.androidaps.Config;
|
|||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.Services.Intents;
|
||||
import info.nightscout.androidaps.data.ProfileStore;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
import info.nightscout.androidaps.interfaces.ProfileInterface;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
import info.nightscout.androidaps.data.ProfileStore;
|
||||
import info.nightscout.androidaps.plugins.ProfileNS.events.EventNSProfileUpdateGUI;
|
||||
import info.nightscout.androidaps.plugins.SmsCommunicator.SmsCommunicatorPlugin;
|
||||
import info.nightscout.utils.SP;
|
||||
|
@ -62,12 +62,12 @@ public class NSProfilePlugin implements PluginBase, ProfileInterface {
|
|||
|
||||
@Override
|
||||
public boolean isEnabled(int type) {
|
||||
return type == PROFILE && fragmentEnabled;
|
||||
return type == PROFILE && (Config.NSCLIENT || fragmentEnabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisibleInTabs(int type) {
|
||||
return type == PROFILE && fragmentVisible;
|
||||
return type == PROFILE && (Config.NSCLIENT ||fragmentVisible);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,7 +82,7 @@ public class NSProfilePlugin implements PluginBase, ProfileInterface {
|
|||
|
||||
@Override
|
||||
public boolean showInList(int type) {
|
||||
return true;
|
||||
return !Config.NSCLIENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package info.nightscout.androidaps.plugins.SourceNSClient;
|
||||
|
||||
import info.nightscout.androidaps.Config;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.BgSourceInterface;
|
||||
|
@ -35,7 +36,7 @@ public class SourceNSClientPlugin implements PluginBase, BgSourceInterface {
|
|||
|
||||
@Override
|
||||
public boolean isEnabled(int type) {
|
||||
return type == BGSOURCE && fragmentEnabled;
|
||||
return Config.NSCLIENT || type == BGSOURCE && fragmentEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,7 +56,7 @@ public class SourceNSClientPlugin implements PluginBase, BgSourceInterface {
|
|||
|
||||
@Override
|
||||
public boolean showInList(int type) {
|
||||
return true;
|
||||
return !Config.NSCLIENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,6 +11,7 @@ import java.util.ArrayList;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import info.nightscout.androidaps.Config;
|
||||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
|
@ -18,12 +19,14 @@ import info.nightscout.androidaps.data.DetailedBolusInfo;
|
|||
import info.nightscout.androidaps.data.Iob;
|
||||
import info.nightscout.androidaps.data.IobTotal;
|
||||
import info.nightscout.androidaps.data.MealData;
|
||||
import info.nightscout.androidaps.data.OverlappingIntervals;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.data.ProfileIntervals;
|
||||
import info.nightscout.androidaps.db.ExtendedBolus;
|
||||
import info.nightscout.androidaps.db.ProfileSwitch;
|
||||
import info.nightscout.androidaps.db.TempTarget;
|
||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||
import info.nightscout.androidaps.db.Treatment;
|
||||
import info.nightscout.androidaps.events.EventNewBasalProfile;
|
||||
import info.nightscout.androidaps.events.EventProfileSwitchChange;
|
||||
import info.nightscout.androidaps.events.EventReloadTempBasalData;
|
||||
import info.nightscout.androidaps.events.EventReloadTreatmentData;
|
||||
|
@ -33,9 +36,6 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
|
|||
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
|
||||
import info.nightscout.androidaps.plugins.IobCobCalculator.AutosensData;
|
||||
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.data.OverlappingIntervals;
|
||||
import info.nightscout.androidaps.data.ProfileIntervals;
|
||||
import info.nightscout.utils.SP;
|
||||
|
||||
/**
|
||||
|
@ -99,7 +99,7 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface {
|
|||
|
||||
@Override
|
||||
public boolean showInList(int type) {
|
||||
return true;
|
||||
return !Config.NSCLIENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -74,6 +74,7 @@ public class TreatmentsTemporaryBasalsFragment extends Fragment {
|
|||
holder.netInsulin.setText("");
|
||||
holder.netRatio.setText("");
|
||||
holder.extendedFlag.setVisibility(View.GONE);
|
||||
holder.iob.setTextColor(holder.netRatio.getCurrentTextColor());
|
||||
} else {
|
||||
if (tempBasal.isInProgress()) {
|
||||
holder.date.setText(DateUtil.dateAndTimeString(tempBasal.date));
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.squareup.otto.Subscribe;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import info.nightscout.androidaps.Config;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.data.IobTotal;
|
||||
|
@ -98,7 +99,7 @@ public class StatuslinePlugin implements PluginBase {
|
|||
|
||||
@Override
|
||||
public boolean showInList(int type) {
|
||||
return true;
|
||||
return !Config.NSCLIENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/configbuilder_bgsourcelabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
|
@ -113,6 +114,7 @@
|
|||
android:background="@color/cardColorBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/configbuilder_profilelabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
|
@ -129,6 +131,7 @@
|
|||
android:background="@color/cardColorBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/configbuilder_treatmentslabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
|
|
|
@ -17,11 +17,12 @@
|
|||
android:id="@+id/profileview_noprofile"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/noprofileset"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="@android:color/holo_red_light"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center_horizontal" />
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in a new issue