Rx drivers: set new TBR if running is expiring

This commit is contained in:
Milos Kozak 2019-07-27 23:59:27 +02:00
parent 7bf54a8ce9
commit 4bf1b777a2
4 changed files with 4 additions and 4 deletions

View file

@ -239,7 +239,7 @@ public class DanaRPlugin extends AbstractDanaRPlugin {
// Correct basal already set ?
if (L.isEnabled(L.PUMP))
log.debug("setTempBasalAbsolute: currently running: " + activeTemp.toString());
if (activeTemp.percentRate == percentRate) {
if (activeTemp.percentRate == percentRate && activeTemp.getPlannedRemainingMinutes() > 4) {
if (enforceNew) {
cancelTempBasal(true);
} else {

View file

@ -242,7 +242,7 @@ public class DanaRKoreanPlugin extends AbstractDanaRPlugin {
// Correct basal already set ?
if (L.isEnabled(L.PUMP))
log.debug("setTempBasalAbsolute: currently running: " + activeTemp.toString());
if (activeTemp.percentRate == percentRate) {
if (activeTemp.percentRate == percentRate && activeTemp.getPlannedRemainingMinutes() > 4) {
if (enforceNew) {
cancelTempBasal(true);
} else {

View file

@ -495,7 +495,7 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
if (L.isEnabled(L.PUMP))
log.debug("setTempBasalAbsolute: currently running: " + activeTemp.toString());
// Correct basal already set ?
if (activeTemp.percentRate == percentRate) {
if (activeTemp.percentRate == percentRate && activeTemp.getPlannedRemainingMinutes() > 4) {
if (!enforceNew) {
result.success = true;
result.percent = percentRate;

View file

@ -238,7 +238,7 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(System.currentTimeMillis());
if (activeTemp != null) {
// Correct basal already set ?
if (activeTemp.percentRate == percentRate) {
if (activeTemp.percentRate == percentRate && activeTemp.getPlannedRemainingMinutes() > 4) {
if (!enforceNew) {
result.success = true;
result.percent = percentRate;