check if pump info is loaded before invoking loop
This commit is contained in:
parent
163ccf2d0a
commit
b5ecbc11e8
3 changed files with 5 additions and 7 deletions
|
@ -12,12 +12,7 @@
|
||||||
<option value="$PROJECT_DIR$/app" />
|
<option value="$PROJECT_DIR$/app" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="myModules">
|
<option name="resolveModulePerSourceSet" value="false" />
|
||||||
<set>
|
|
||||||
<option value="$PROJECT_DIR$" />
|
|
||||||
<option value="$PROJECT_DIR$/app" />
|
|
||||||
</set>
|
|
||||||
</option>
|
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -131,6 +131,9 @@ public class LoopPlugin implements PluginBase {
|
||||||
if (configBuilder == null || !isEnabled(PluginBase.GENERAL))
|
if (configBuilder == null || !isEnabled(PluginBase.GENERAL))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Check if pump info is loaded
|
||||||
|
if (configBuilder.getBaseBasalRate() < 0.01d) return;
|
||||||
|
|
||||||
APSInterface usedAPS = configBuilder.getActiveAPS();
|
APSInterface usedAPS = configBuilder.getActiveAPS();
|
||||||
if (usedAPS != null && ((PluginBase) usedAPS).isEnabled(PluginBase.APS)) {
|
if (usedAPS != null && ((PluginBase) usedAPS).isEnabled(PluginBase.APS)) {
|
||||||
usedAPS.invoke();
|
usedAPS.invoke();
|
||||||
|
|
|
@ -5,7 +5,7 @@ buildscript {
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.1.3'
|
classpath 'com.android.tools.build:gradle:2.2.0'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
|
Loading…
Reference in a new issue