From 26e7834093720b93623dbc4e65595bf239fe460a Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Thu, 1 Feb 2018 22:04:17 +0100 Subject: [PATCH] Clean up, no behavioral changes and a bigger bed. --- .../androidaps/plugins/PumpCombo/ComboFragment.java | 2 +- .../androidaps/plugins/PumpCombo/ComboPlugin.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java index df9b6e84f1..bebc5336d7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java @@ -199,7 +199,7 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis activityView.setTextSize(14); activityView.setText(activity); } else { - activityView.setTextSize(18); + activityView.setTextSize(20); activityView.setText("{fa-bed}"); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java index 9103264d32..f6b30a4527 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java @@ -717,11 +717,11 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf } @Override - public PumpEnactResult cancelTempBasal(boolean userRequested) { + public PumpEnactResult cancelTempBasal(boolean enforceNew) { log.debug("cancelTempBasal called"); final TemporaryBasal activeTemp = MainApp.getConfigBuilder().getTempBasalFromHistory(System.currentTimeMillis()); - if (userRequested) { - log.debug("cancelTempBasal: hard-cancelling TBR since user requested"); + if (enforceNew) { + log.debug("cancelTempBasal: hard-cancelling TBR since force requested"); CommandResult commandResult = runCommand(MainApp.gs(R.string.combo_pump_action_cancelling_tbr), 2, ruffyScripter::cancelTbr); if (!commandResult.state.tbrActive) { TemporaryBasal tempBasal = new TemporaryBasal(); @@ -737,8 +737,8 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf return new PumpEnactResult().success(true).enacted(false); } else if ((activeTemp.percentRate >= 90 && activeTemp.percentRate <= 110) && activeTemp.getPlannedRemainingMinutes() <= 15) { // Let fake neutral temp keep run (see below) - // Note that a connection to the pump is still opened, since the queue issues a getPumpStatus() call whenever an empty - // queue receives a new command. Probably not worth optimizing. + // Note that since this runs on the queue a connection is opened regardless, but this + // case doesn't occur all that often, so it's not worth optimizing (1.3k SetTBR vs 4 cancelTBR). log.debug("cancelTempBasal: skipping changing tbr since it already is at " + activeTemp.percentRate + "% and running for another " + activeTemp.getPlannedRemainingMinutes() + " mins."); return new PumpEnactResult().success(true).enacted(true) .comment("cancelTempBasal skipping changing tbr since it already is at "