read pump status after pump driver change
This commit is contained in:
parent
5e2fdebc07
commit
5a192d82d0
17 changed files with 25 additions and 4 deletions
|
@ -1,9 +1,12 @@
|
||||||
package info.nightscout.androidaps.interfaces;
|
package info.nightscout.androidaps.interfaces;
|
||||||
|
|
||||||
|
import android.os.SystemClock;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
|
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 09.06.2016.
|
* Created by mike on 09.06.2016.
|
||||||
|
@ -146,6 +149,12 @@ public abstract class PluginBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
|
if (getType() == PluginType.PUMP) {
|
||||||
|
new Thread(() -> {
|
||||||
|
SystemClock.sleep(3000);
|
||||||
|
ConfigBuilderPlugin.getCommandQueue().readStatus("Pump driver changed.", null);
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
|
|
|
@ -97,8 +97,8 @@ public class ConfigBuilderPlugin extends PluginBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
super.onStart();
|
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -78,8 +78,8 @@ public class IobCobCalculatorPlugin extends PluginBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
super.onStart();
|
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -89,8 +89,8 @@ public class LoopPlugin extends PluginBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
super.onStart();
|
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -86,6 +86,7 @@ public class NSClientPlugin extends PluginBase {
|
||||||
Context context = MainApp.instance().getApplicationContext();
|
Context context = MainApp.instance().getApplicationContext();
|
||||||
Intent intent = new Intent(context, NSClientService.class);
|
Intent intent = new Intent(context, NSClientService.class);
|
||||||
context.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
|
context.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -62,6 +62,7 @@ public class OverviewPlugin extends PluginBase {
|
||||||
@Override
|
@Override
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -58,6 +58,7 @@ public class PersistentNotificationPlugin extends PluginBase {
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
updateNotification();
|
updateNotification();
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -55,6 +55,7 @@ public class NSProfilePlugin extends PluginBase implements ProfileInterface {
|
||||||
@Override
|
@Override
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -80,6 +80,7 @@ public class DanaRPlugin extends AbstractDanaRPlugin {
|
||||||
Intent intent = new Intent(context, DanaRExecutionService.class);
|
Intent intent = new Intent(context, DanaRExecutionService.class);
|
||||||
context.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
|
context.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -81,6 +81,7 @@ public class DanaRKoreanPlugin extends AbstractDanaRPlugin {
|
||||||
Intent intent = new Intent(context, DanaRKoreanExecutionService.class);
|
Intent intent = new Intent(context, DanaRKoreanExecutionService.class);
|
||||||
context.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
|
context.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -131,6 +131,7 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
||||||
|
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
onStatusEvent(new EventDanaRSDeviceChange()); // load device name
|
onStatusEvent(new EventDanaRSDeviceChange()); // load device name
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -81,6 +81,7 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
|
||||||
context.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
|
context.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
|
||||||
|
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -171,6 +171,7 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
|
|
|
@ -131,6 +131,7 @@ public class SmsCommunicatorPlugin extends PluginBase {
|
||||||
@Override
|
@Override
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -86,6 +86,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
|
||||||
initializeExtendedBolusData();
|
initializeExtendedBolusData();
|
||||||
initializeTempTargetData();
|
initializeTempTargetData();
|
||||||
initializeProfileSwitchData();
|
initializeProfileSwitchData();
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -66,6 +66,7 @@ public class WearPlugin extends PluginBase {
|
||||||
if (watchUS != null) {
|
if (watchUS != null) {
|
||||||
watchUS.setSettings();
|
watchUS.setSettings();
|
||||||
}
|
}
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -75,9 +75,9 @@ public class StatuslinePlugin extends PluginBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
super.onStart();
|
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
sendStatus();
|
sendStatus();
|
||||||
|
super.onStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue