check if pump info is loaded before invoking loop

This commit is contained in:
Milos Kozak 2016-10-01 19:47:18 +02:00
parent 163ccf2d0a
commit b5ecbc11e8
3 changed files with 5 additions and 7 deletions

View file

@ -12,12 +12,7 @@
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="myModules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>

View file

@ -131,6 +131,9 @@ public class LoopPlugin implements PluginBase {
if (configBuilder == null || !isEnabled(PluginBase.GENERAL))
return;
// Check if pump info is loaded
if (configBuilder.getBaseBasalRate() < 0.01d) return;
APSInterface usedAPS = configBuilder.getActiveAPS();
if (usedAPS != null && ((PluginBase) usedAPS).isEnabled(PluginBase.APS)) {
usedAPS.invoke();

View file

@ -5,7 +5,7 @@ buildscript {
jcenter()
}
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
// in the individual module build.gradle files