diff --git a/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/commands/CancelTbrCommand.java b/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/commands/CancelTbrCommand.java index 1fcad0a3d1..32d82ea436 100644 --- a/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/commands/CancelTbrCommand.java +++ b/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/commands/CancelTbrCommand.java @@ -21,23 +21,18 @@ public class CancelTbrCommand extends BaseCommand { return Collections.emptyList(); } + @Override + public String reconnectAlarm() { + return "TBR CANCELLED"; + } + @Override public CommandResult execute() { try { scripter.verifyMenuIsDisplayed(MenuType.MAIN_MENU); PumpState pumpState = scripter.readPumpStateInternal(); if (!pumpState.tbrActive) { -// log.debug("active temp basal 90s ago: " + -// MainApp.getConfigBuilder().getTempBasalFromHistory(System.currentTimeMillis() - 90 * 1000)); -// log.debug("active temp basal 60s ago: " + -// MainApp.getConfigBuilder().getTempBasalFromHistory(System.currentTimeMillis() - 30 * 1000)); -// log.debug("active temp basal 30s ago: " + -// 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"); + log.debug("No TBR active to cancel"); return new CommandResult() .success(true) // Technically, nothing was enacted, but AAPS needs this to recover @@ -47,6 +42,7 @@ public class CancelTbrCommand extends BaseCommand { .enacted(true) .message("No TBR active"); } + log.debug("Cancelling active TBR of " + pumpState.tbrPercent + "% with " + pumpState.tbrRemainingDuration + " min remaining"); SetTbrCommand setTbrCommand = new SetTbrCommand(100, 0);