Merge pull request #936 from jotomo/ext-combo-carbs

Extended Combo carbs
This commit is contained in:
AdrianLxM 2018-04-27 20:06:07 +02:00 committed by GitHub
commit c8ca904709
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 9 deletions

View file

@ -155,8 +155,7 @@ public class MainApp extends Application {
pluginsList.add(CareportalPlugin.getPlugin()); pluginsList.add(CareportalPlugin.getPlugin());
if (Config.HWPUMPS && engineeringMode) if (Config.HWPUMPS && engineeringMode)
pluginsList.add(InsightPlugin.getPlugin()); // <-- Enable Insight plugin here pluginsList.add(InsightPlugin.getPlugin()); // <-- Enable Insight plugin here
if (Config.HWPUMPS && engineeringMode) if (Config.HWPUMPS) pluginsList.add(ComboPlugin.getPlugin());
pluginsList.add(ComboPlugin.getPlugin()); // <-- Enable Combo plugin here
if (Config.MDI) pluginsList.add(MDIPlugin.getPlugin()); if (Config.MDI) pluginsList.add(MDIPlugin.getPlugin());
pluginsList.add(VirtualPumpPlugin.getPlugin()); pluginsList.add(VirtualPumpPlugin.getPlugin());
if (Config.APS) pluginsList.add(LoopPlugin.getPlugin()); if (Config.APS) pluginsList.add(LoopPlugin.getPlugin());

View file

@ -133,9 +133,6 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, C
editTime = view.findViewById(R.id.newcarbs_time); editTime = view.findViewById(R.id.newcarbs_time);
editTime.setParams(0d, -12 * 60d, 12 * 60d, 5d, new DecimalFormat("0"), false, textWatcher); editTime.setParams(0d, -12 * 60d, 12 * 60d, 5d, new DecimalFormat("0"), false, textWatcher);
LinearLayout durationLayout = view.findViewById(R.id.newcarbs_duration_layout);
durationLayout.setVisibility(MainApp.engineeringMode ? View.VISIBLE : View.GONE);
editDuration = view.findViewById(R.id.new_carbs_duration); editDuration = view.findViewById(R.id.new_carbs_duration);
editDuration.setParams(0d, 0d, 10d, 1d, new DecimalFormat("0"), false, textWatcher); editDuration.setParams(0d, 0d, 10d, 1d, new DecimalFormat("0"), false, textWatcher);

View file

@ -151,7 +151,7 @@ public class ComboPlugin extends PluginBase implements PumpInterface, Constraint
/** /**
* Cache of the last <=2 boluses on the pump. Used to detect changes in pump history, * Cache of the last <=2 boluses on the pump. Used to detect changes in pump history,
* requiring reading pump more history. This is read/set in {@link #checkHistory()} when changed * requiring reading more pump history. This is read/set in {@link #checkHistory()} when changed
* pump history was detected and was read, as well as in {@link #deliverBolus(DetailedBolusInfo)} * pump history was detected and was read, as well as in {@link #deliverBolus(DetailedBolusInfo)}
* after bolus delivery. Newest record is the first one. * after bolus delivery. Newest record is the first one.
*/ */
@ -326,7 +326,7 @@ public class ComboPlugin extends PluginBase implements PumpInterface, Constraint
} }
/** /**
* Runs pump initializing if needed and reads the pump state from the main screen. * Runs pump initialization if needed and reads the pump state from the main screen.
*/ */
@Override @Override
public synchronized void getPumpStatus() { public synchronized void getPumpStatus() {
@ -442,8 +442,6 @@ public class ComboPlugin extends PluginBase implements PumpInterface, Constraint
case STOPPED: case STOPPED:
event.status = MainApp.gs(R.string.bolusstopped); event.status = MainApp.gs(R.string.bolusstopped);
break; break;
case RECOVERING:
event.status = MainApp.gs(R.string.combo_error_bolus_recovery_progress);
} }
event.percent = percent; event.percent = percent;
MainApp.bus().post(event); MainApp.bus().post(event);