From fcd6f4ea0e56b511369a6976bee374e9a16f3d7c Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Sat, 22 Jul 2017 11:36:52 +0200 Subject: [PATCH] jotomo/AndroidAPS#29 Don't raise alarm on 'double cancellation'. --- .../de/jotomo/ruffyscripter/commands/CancelTbrCommand.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/de/jotomo/ruffyscripter/commands/CancelTbrCommand.java b/app/src/main/java/de/jotomo/ruffyscripter/commands/CancelTbrCommand.java index bd58e4690f..2931f1d9d9 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/CancelTbrCommand.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/CancelTbrCommand.java @@ -35,10 +35,11 @@ public class CancelTbrCommand implements Command { MainApp.getConfigBuilder().getTempBasalFromHistory(System.currentTimeMillis() - 30 * 1000)); log.debug("active temp basal now:: " + MainApp.getConfigBuilder().getTempBasalFromHistory(System.currentTimeMillis())); + // TODO keep checking logs to ensure this case only happens because CancelTbrCommand was called + // twice by AAPS log.warn("No TBR active to cancel"); return new CommandResult() - // Raise a warning about this, until we know it's safe to ignore. - .success(false) + .success(true) // Technically, nothing was enacted, but AAPS needs this to recover // when there was an issue and AAPS thinks a TBR is still active, // so the ComboPlugin can create a TempporaryBasel to mark the TBR