use default dia when no profile available
This commit is contained in:
parent
51b01a0993
commit
448cf7ea85
|
@ -1,5 +1,6 @@
|
||||||
package info.nightscout.androidaps.plugins.InsulinFastacting;
|
package info.nightscout.androidaps.plugins.InsulinFastacting;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.Constants;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.data.Iob;
|
import info.nightscout.androidaps.data.Iob;
|
||||||
|
@ -89,7 +90,7 @@ public class InsulinFastactingPlugin implements PluginBase, InsulinInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getDia() {
|
public double getDia() {
|
||||||
return MainApp.getConfigBuilder().getProfile().getDia();
|
return MainApp.getConfigBuilder().getProfile() != null ? MainApp.getConfigBuilder().getProfile().getDia() : Constants.defaultDIA;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package info.nightscout.androidaps.plugins.InsulinFastactingProlonged;
|
package info.nightscout.androidaps.plugins.InsulinFastactingProlonged;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.Constants;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.data.Iob;
|
import info.nightscout.androidaps.data.Iob;
|
||||||
|
@ -89,7 +90,7 @@ public class InsulinFastactingProlongedPlugin implements PluginBase, InsulinInte
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getDia() {
|
public double getDia() {
|
||||||
return MainApp.getConfigBuilder().getProfile().getDia();
|
return MainApp.getConfigBuilder().getProfile() != null ? MainApp.getConfigBuilder().getProfile().getDia() : Constants.defaultDIA;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue