diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/AbstractDanaRPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/AbstractDanaRPlugin.java index 903be558b9..1f51979126 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/AbstractDanaRPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/AbstractDanaRPlugin.java @@ -59,6 +59,7 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte .pluginName(R.string.danarspump) .shortName(R.string.danarpump_shortname) .preferencesId(R.xml.pref_danars) + .description(R.string.description_pump_dana_r) ); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java index b37d0e945f..8d18ca4f04 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java @@ -162,19 +162,24 @@ public class DanaRFragment extends SubscriberFragment { activity.runOnUiThread( new Runnable() { @Override - public void run() { - if (c.sStatus == EventPumpStatusChanged.CONNECTING) - btConnectionView.setText("{fa-bluetooth-b spin} " + c.sSecondsElapsed + "s"); - else if (c.sStatus == EventPumpStatusChanged.CONNECTED) - btConnectionView.setText("{fa-bluetooth}"); - else if (c.sStatus == EventPumpStatusChanged.DISCONNECTED) - btConnectionView.setText("{fa-bluetooth-b}"); + public void run() { + synchronized(DanaRFragment.this){ - if (!status.equals("")) { - pumpStatusView.setText(status); - pumpStatusLayout.setVisibility(View.VISIBLE); - } else { - pumpStatusLayout.setVisibility(View.GONE); + if(btConnectionView == null || pumpStatusView == null || pumpStatusLayout == null ) return; + + if (c.sStatus == EventPumpStatusChanged.CONNECTING) + btConnectionView.setText("{fa-bluetooth-b spin} " + c.sSecondsElapsed + "s"); + else if (c.sStatus == EventPumpStatusChanged.CONNECTED) + btConnectionView.setText("{fa-bluetooth}"); + else if (c.sStatus == EventPumpStatusChanged.DISCONNECTED) + btConnectionView.setText("{fa-bluetooth-b}"); + + if (!status.equals("")) { + pumpStatusView.setText(status); + pumpStatusLayout.setVisibility(View.VISIBLE); + } else { + pumpStatusLayout.setVisibility(View.GONE); + } } } } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRPlugin.java index 69c07ce706..b1b0f3d9ce 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRPlugin.java @@ -382,6 +382,6 @@ public class DanaRPlugin extends AbstractDanaRPlugin { @Override public PumpEnactResult setUserOptions() { - return null; + return sExecutionService.setUserOptions(); } } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRPump.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRPump.java index d9bc947b84..1e346695e3 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRPump.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRPump.java @@ -161,7 +161,7 @@ public class DanaRPump { public int lowReservoirRate; public int cannulaVolume; public int refillAmount; - public byte[] userOptionsFrompump; + public double initialBolusAmount; // Bolus settings public int bolusCalculationOption;