VirtualPump: do not cancel percent temp prior adding new
This commit is contained in:
parent
874be7ff48
commit
0a52bc9976
1 changed files with 1 additions and 6 deletions
|
@ -288,17 +288,12 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes, Profile profile, boolean enforceNew) {
|
public PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes, Profile profile, boolean enforceNew) {
|
||||||
PumpEnactResult result = new PumpEnactResult();
|
|
||||||
if (TreatmentsPlugin.getPlugin().isTempBasalInProgress()) {
|
|
||||||
result = cancelTempBasal(false);
|
|
||||||
if (!result.success)
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
TemporaryBasal tempBasal = new TemporaryBasal()
|
TemporaryBasal tempBasal = new TemporaryBasal()
|
||||||
.date(System.currentTimeMillis())
|
.date(System.currentTimeMillis())
|
||||||
.percent(percent)
|
.percent(percent)
|
||||||
.duration(durationInMinutes)
|
.duration(durationInMinutes)
|
||||||
.source(Source.USER);
|
.source(Source.USER);
|
||||||
|
PumpEnactResult result = new PumpEnactResult();
|
||||||
result.success = true;
|
result.success = true;
|
||||||
result.enacted = true;
|
result.enacted = true;
|
||||||
result.percent = percent;
|
result.percent = percent;
|
||||||
|
|
Loading…
Reference in a new issue