diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRPlugin.java index 72a7a74248..8e466652c4 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRPlugin.java @@ -713,7 +713,7 @@ public class DanaRPlugin implements PluginBase, PumpInterface, ConstraintsInterf } @Override - public PumpDescription getPumpDescription() { + public static PumpDescription getPumpDescription() { return pumpDescription; } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/comm/MsgSettingBasal.java b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/comm/MsgSettingBasal.java index 77ebfd0021..5cb8e7df0a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/comm/MsgSettingBasal.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/comm/MsgSettingBasal.java @@ -23,7 +23,7 @@ public class MsgSettingBasal extends MessageBase { pump.pumpProfiles[pump.activeProfile] = new double[24]; for (int index = 0; index < 24; index++) { int basal = intFromBuff(bytes, 2 * index, 2); - if (basal < 10) basal = 0; + if (basal < DanaRPlugin.getPumpDescription().basalMinimumRate) basal = 0; pump.pumpProfiles[pump.activeProfile][index] = basal / 100d; } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/DanaRKorean/DanaRKoreanPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/DanaRKorean/DanaRKoreanPlugin.java index 02fe206197..a3a8827e17 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/DanaRKorean/DanaRKoreanPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/DanaRKorean/DanaRKoreanPlugin.java @@ -713,7 +713,7 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, Constraints } @Override - public PumpDescription getPumpDescription() { + public static PumpDescription getPumpDescription() { return pumpDescription; } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/DanaRKorean/comm/MsgSettingBasal.java b/app/src/main/java/info/nightscout/androidaps/plugins/DanaRKorean/comm/MsgSettingBasal.java index e6ac4b9003..81b4627402 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/DanaRKorean/comm/MsgSettingBasal.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/DanaRKorean/comm/MsgSettingBasal.java @@ -24,7 +24,7 @@ public class MsgSettingBasal extends MessageBase { pump.pumpProfiles[pump.activeProfile] = new double[24]; for (int index = 0; index < 24; index++) { int basal = intFromBuff(bytes, 2 * index, 2); - if (basal < 10) basal = 0; + if (basal < DanaRKoreanPlugin.getPumpDescription().basalMinimumRate) basal = 0; pump.pumpProfiles[pump.activeProfile][index] = basal / 100d; }