Merge branch 'dev' of https://github.com/MilosKozak/AndroidAPS into dev
This commit is contained in:
commit
70374ee341
|
@ -1013,6 +1013,8 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
}
|
}
|
||||||
|
|
||||||
public Profile getProfile(long time) {
|
public Profile getProfile(long time) {
|
||||||
|
if (activeTreatments == null)
|
||||||
|
return null; //app not initialized
|
||||||
//log.debug("Profile for: " + new Date(time).toLocaleString() + " : " + getProfileName(time));
|
//log.debug("Profile for: " + new Date(time).toLocaleString() + " : " + getProfileName(time));
|
||||||
ProfileSwitch profileSwitch = getProfileSwitchFromHistory(time);
|
ProfileSwitch profileSwitch = getProfileSwitchFromHistory(time);
|
||||||
if (profileSwitch != null) {
|
if (profileSwitch != null) {
|
||||||
|
|
|
@ -303,6 +303,8 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
||||||
public void calculateSensitivityData() {
|
public void calculateSensitivityData() {
|
||||||
if (MainApp.getConfigBuilder() == null)
|
if (MainApp.getConfigBuilder() == null)
|
||||||
return; // app still initializing
|
return; // app still initializing
|
||||||
|
if (MainApp.getConfigBuilder().getProfile() == null)
|
||||||
|
return; // app still initializing
|
||||||
//log.debug("Locking calculateSensitivityData");
|
//log.debug("Locking calculateSensitivityData");
|
||||||
synchronized (dataLock) {
|
synchronized (dataLock) {
|
||||||
|
|
||||||
|
@ -617,6 +619,8 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
||||||
if (MainApp.getConfigBuilder() == null)
|
if (MainApp.getConfigBuilder() == null)
|
||||||
return; // app still initializing
|
return; // app still initializing
|
||||||
Profile profile = MainApp.getConfigBuilder().getProfile();
|
Profile profile = MainApp.getConfigBuilder().getProfile();
|
||||||
|
if (profile == null)
|
||||||
|
return; // app still initializing
|
||||||
dia = profile.getDia();
|
dia = profile.getDia();
|
||||||
if (ev == null) { // on init no need of reset
|
if (ev == null) { // on init no need of reset
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue