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
|
||||
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()
|
||||
.date(System.currentTimeMillis())
|
||||
.percent(percent)
|
||||
.duration(durationInMinutes)
|
||||
.source(Source.USER);
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
result.success = true;
|
||||
result.enacted = true;
|
||||
result.percent = percent;
|
||||
|
|
Loading…
Reference in a new issue