Merge branch 'dev' of https://github.com/MilosKozak/AndroidAPS into dev
This commit is contained in:
commit
78f1fe6423
5 changed files with 12 additions and 12 deletions
|
@ -194,8 +194,8 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
||||||
if (percent > getPumpDescription().maxTempPercent)
|
if (percent > getPumpDescription().maxTempPercent)
|
||||||
percent = getPumpDescription().maxTempPercent;
|
percent = getPumpDescription().maxTempPercent;
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
TemporaryBasal runningTB = TreatmentsPlugin.getPlugin().getRealTempBasalFromHistory(now);
|
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getRealTempBasalFromHistory(now);
|
||||||
if (runningTB != null && runningTB.percentRate == percent && !enforceNew) {
|
if (activeTemp != null && activeTemp.percentRate == percent && activeTemp.getPlannedRemainingMinutes() > 4 && !enforceNew) {
|
||||||
result.enacted = false;
|
result.enacted = false;
|
||||||
result.success = true;
|
result.success = true;
|
||||||
result.isTempCancel = false;
|
result.isTempCancel = false;
|
||||||
|
|
|
@ -239,7 +239,7 @@ public class DanaRPlugin extends AbstractDanaRPlugin {
|
||||||
// Correct basal already set ?
|
// Correct basal already set ?
|
||||||
if (L.isEnabled(L.PUMP))
|
if (L.isEnabled(L.PUMP))
|
||||||
log.debug("setTempBasalAbsolute: currently running: " + activeTemp.toString());
|
log.debug("setTempBasalAbsolute: currently running: " + activeTemp.toString());
|
||||||
if (activeTemp.percentRate == percentRate) {
|
if (activeTemp.percentRate == percentRate && activeTemp.getPlannedRemainingMinutes() > 4) {
|
||||||
if (enforceNew) {
|
if (enforceNew) {
|
||||||
cancelTempBasal(true);
|
cancelTempBasal(true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -242,7 +242,7 @@ public class DanaRKoreanPlugin extends AbstractDanaRPlugin {
|
||||||
// Correct basal already set ?
|
// Correct basal already set ?
|
||||||
if (L.isEnabled(L.PUMP))
|
if (L.isEnabled(L.PUMP))
|
||||||
log.debug("setTempBasalAbsolute: currently running: " + activeTemp.toString());
|
log.debug("setTempBasalAbsolute: currently running: " + activeTemp.toString());
|
||||||
if (activeTemp.percentRate == percentRate) {
|
if (activeTemp.percentRate == percentRate && activeTemp.getPlannedRemainingMinutes() > 4) {
|
||||||
if (enforceNew) {
|
if (enforceNew) {
|
||||||
cancelTempBasal(true);
|
cancelTempBasal(true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -495,7 +495,7 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
||||||
if (L.isEnabled(L.PUMP))
|
if (L.isEnabled(L.PUMP))
|
||||||
log.debug("setTempBasalAbsolute: currently running: " + activeTemp.toString());
|
log.debug("setTempBasalAbsolute: currently running: " + activeTemp.toString());
|
||||||
// Correct basal already set ?
|
// Correct basal already set ?
|
||||||
if (activeTemp.percentRate == percentRate) {
|
if (activeTemp.percentRate == percentRate && activeTemp.getPlannedRemainingMinutes() > 4) {
|
||||||
if (!enforceNew) {
|
if (!enforceNew) {
|
||||||
result.success = true;
|
result.success = true;
|
||||||
result.percent = percentRate;
|
result.percent = percentRate;
|
||||||
|
@ -513,7 +513,7 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
||||||
if (L.isEnabled(L.PUMP))
|
if (L.isEnabled(L.PUMP))
|
||||||
log.debug("setTempBasalAbsolute: Setting temp basal " + percentRate + "% for " + durationInMinutes + " mins (doLowTemp || doHighTemp)");
|
log.debug("setTempBasalAbsolute: Setting temp basal " + percentRate + "% for " + durationInMinutes + " mins (doLowTemp || doHighTemp)");
|
||||||
if (percentRate == 0 && durationInMinutes > 30) {
|
if (percentRate == 0 && durationInMinutes > 30) {
|
||||||
result = setTempBasalPercent(percentRate, durationInMinutes, profile, false);
|
result = setTempBasalPercent(percentRate, durationInMinutes, profile, enforceNew);
|
||||||
} else {
|
} else {
|
||||||
// use special APS temp basal call ... 100+/15min .... 100-/30min
|
// use special APS temp basal call ... 100+/15min .... 100-/30min
|
||||||
result = setHighTempBasalPercent(percentRate);
|
result = setHighTempBasalPercent(percentRate);
|
||||||
|
@ -549,8 +549,8 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
||||||
if (percent > getPumpDescription().maxTempPercent)
|
if (percent > getPumpDescription().maxTempPercent)
|
||||||
percent = getPumpDescription().maxTempPercent;
|
percent = getPumpDescription().maxTempPercent;
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
TemporaryBasal runningTB = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(now);
|
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(now);
|
||||||
if (runningTB != null && runningTB.percentRate == percent && !enforceNew) {
|
if (activeTemp != null && activeTemp.percentRate == percent && activeTemp.getPlannedRemainingMinutes() > 4 && !enforceNew) {
|
||||||
result.enacted = false;
|
result.enacted = false;
|
||||||
result.success = true;
|
result.success = true;
|
||||||
result.isTempCancel = false;
|
result.isTempCancel = false;
|
||||||
|
|
|
@ -238,7 +238,7 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
|
||||||
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(System.currentTimeMillis());
|
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(System.currentTimeMillis());
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
// Correct basal already set ?
|
// Correct basal already set ?
|
||||||
if (activeTemp.percentRate == percentRate) {
|
if (activeTemp.percentRate == percentRate && activeTemp.getPlannedRemainingMinutes() > 4) {
|
||||||
if (!enforceNew) {
|
if (!enforceNew) {
|
||||||
result.success = true;
|
result.success = true;
|
||||||
result.percent = percentRate;
|
result.percent = percentRate;
|
||||||
|
@ -256,7 +256,7 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
|
||||||
if (L.isEnabled(L.PUMP))
|
if (L.isEnabled(L.PUMP))
|
||||||
log.debug("setTempBasalAbsolute: Setting temp basal " + percentRate + "% for " + durationInMinutes + " mins (doLowTemp || doHighTemp)");
|
log.debug("setTempBasalAbsolute: Setting temp basal " + percentRate + "% for " + durationInMinutes + " mins (doLowTemp || doHighTemp)");
|
||||||
if (percentRate == 0 && durationInMinutes > 30) {
|
if (percentRate == 0 && durationInMinutes > 30) {
|
||||||
result = setTempBasalPercent(percentRate, durationInMinutes, profile, false);
|
result = setTempBasalPercent(percentRate, durationInMinutes, profile, enforceNew);
|
||||||
} else {
|
} else {
|
||||||
// use special APS temp basal call ... 100+/15min .... 100-/30min
|
// use special APS temp basal call ... 100+/15min .... 100-/30min
|
||||||
result = setHighTempBasalPercent(percentRate);
|
result = setHighTempBasalPercent(percentRate);
|
||||||
|
@ -292,8 +292,8 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
|
||||||
if (percent > getPumpDescription().maxTempPercent)
|
if (percent > getPumpDescription().maxTempPercent)
|
||||||
percent = getPumpDescription().maxTempPercent;
|
percent = getPumpDescription().maxTempPercent;
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
TemporaryBasal runningTB = TreatmentsPlugin.getPlugin().getRealTempBasalFromHistory(now);
|
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getRealTempBasalFromHistory(now);
|
||||||
if (runningTB != null && runningTB.percentRate == percent && !enforceNew) {
|
if (activeTemp != null && activeTemp.percentRate == percent && activeTemp.getPlannedRemainingMinutes() > 4 && !enforceNew) {
|
||||||
result.enacted = false;
|
result.enacted = false;
|
||||||
result.success = true;
|
result.success = true;
|
||||||
result.isTempCancel = false;
|
result.isTempCancel = false;
|
||||||
|
|
Loading…
Reference in a new issue