Rx drivers: set new TBR if running is expiring
This commit is contained in:
parent
f58a219d2d
commit
74bcf3e73e
3 changed files with 6 additions and 6 deletions
|
@ -194,8 +194,8 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
if (percent > getPumpDescription().maxTempPercent)
|
||||
percent = getPumpDescription().maxTempPercent;
|
||||
long now = System.currentTimeMillis();
|
||||
TemporaryBasal runningTB = TreatmentsPlugin.getPlugin().getRealTempBasalFromHistory(now);
|
||||
if (runningTB != null && runningTB.percentRate == percent && !enforceNew) {
|
||||
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getRealTempBasalFromHistory(now);
|
||||
if (activeTemp != null && activeTemp.percentRate == percent && activeTemp.getPlannedRemainingMinutes() > 4 && !enforceNew) {
|
||||
result.enacted = false;
|
||||
result.success = true;
|
||||
result.isTempCancel = false;
|
||||
|
|
|
@ -549,8 +549,8 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
if (percent > getPumpDescription().maxTempPercent)
|
||||
percent = getPumpDescription().maxTempPercent;
|
||||
long now = System.currentTimeMillis();
|
||||
TemporaryBasal runningTB = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(now);
|
||||
if (runningTB != null && runningTB.percentRate == percent && !enforceNew) {
|
||||
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(now);
|
||||
if (activeTemp != null && activeTemp.percentRate == percent && activeTemp.getPlannedRemainingMinutes() > 4 && !enforceNew) {
|
||||
result.enacted = false;
|
||||
result.success = true;
|
||||
result.isTempCancel = false;
|
||||
|
|
|
@ -292,8 +292,8 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
|
|||
if (percent > getPumpDescription().maxTempPercent)
|
||||
percent = getPumpDescription().maxTempPercent;
|
||||
long now = System.currentTimeMillis();
|
||||
TemporaryBasal runningTB = TreatmentsPlugin.getPlugin().getRealTempBasalFromHistory(now);
|
||||
if (runningTB != null && runningTB.percentRate == percent && !enforceNew) {
|
||||
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getRealTempBasalFromHistory(now);
|
||||
if (activeTemp != null && activeTemp.percentRate == percent && activeTemp.getPlannedRemainingMinutes() > 4 && !enforceNew) {
|
||||
result.enacted = false;
|
||||
result.success = true;
|
||||
result.isTempCancel = false;
|
||||
|
|
Loading…
Reference in a new issue