Remove hack to cancel a request for a TBR that is already running (localized issue).
(cherry picked from commit a671536)
This commit is contained in:
parent
cff4bc1abe
commit
6f8e0fc257
|
@ -521,7 +521,8 @@ public class RuffyScripter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO sort out usages of this method and waitForMenu update, which have the same intent,
|
||||||
|
// but approach things differently;
|
||||||
public boolean waitForScreenUpdate(long timeout) {
|
public boolean waitForScreenUpdate(long timeout) {
|
||||||
synchronized (screenlock) {
|
synchronized (screenlock) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -56,17 +56,6 @@ public class SetTbrCommand extends BaseCommand {
|
||||||
public CommandResult execute() {
|
public CommandResult execute() {
|
||||||
try {
|
try {
|
||||||
boolean cancellingTbr = percentage == 100;
|
boolean cancellingTbr = percentage == 100;
|
||||||
PumpState pumpState = scripter.readPumpState();
|
|
||||||
|
|
||||||
// TODO hack, cancelling a TBR that isn't running is dealt with in CancelTbrCommand,
|
|
||||||
// this avoids setting a TBR twice until that AAPS bug is squished which calls this
|
|
||||||
// twice within a minute GL#27
|
|
||||||
if (!cancellingTbr
|
|
||||||
&& pumpState.tbrActive
|
|
||||||
&& pumpState.tbrPercent == percentage
|
|
||||||
&& (pumpState.tbrRemainingDuration == duration || pumpState.tbrRemainingDuration + 1 == duration)) {
|
|
||||||
return new CommandResult().success(true).enacted(false).message("Requested TBR already running");
|
|
||||||
}
|
|
||||||
|
|
||||||
enterTbrMenu();
|
enterTbrMenu();
|
||||||
boolean increasingPercentage = inputTbrPercentage();
|
boolean increasingPercentage = inputTbrPercentage();
|
||||||
|
|
Loading…
Reference in a new issue