add userRequested parameter to cancelTBR as needed in current AAPS dev

This commit is contained in:
Timm Korte 2017-08-07 22:25:57 +02:00
parent f3044a7cbb
commit 8182f99bd2

View file

@ -532,7 +532,7 @@ public class ComboPlugin implements PluginBase, PumpInterface {
}
@Override
public PumpEnactResult cancelTempBasal() {
public PumpEnactResult cancelTempBasal(boolean userRequested) {
log.debug("cancelTempBasal called");
CommandResult commandResult = null;
@ -541,7 +541,7 @@ public class ComboPlugin implements PluginBase, PumpInterface {
final TemporaryBasal activeTemp = MainApp.getConfigBuilder().getTempBasalFromHistory(System.currentTimeMillis());
if (activeTemp == null) {
if (activeTemp == null || userRequested) {
log.debug("cancelTempBasal: hard-cancelling TBR since user requested");
commandResult = runCommand(new CancelTbrCommand());
if (commandResult.enacted) {