Fix CancelTbrCommand to return command resutlt not in PumpState but as part of the CommandResult object.

This commit is contained in:
Johannes Mockenhaupt 2017-07-19 01:30:26 +02:00
parent 825a87f474
commit 5aacf8410d
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -34,8 +34,7 @@ public class CancelTbrCommand implements Command {
// to make sure we can inspect this situation.
// Set enacted=true, so I record is created and AAPS stops thinking a TBR still
// running and trying again to cancel it.
return new CommandResult().success(false).enacted(true)
.state(new PumpState().errorMsg("NO TBR active"));
return new CommandResult().success(false).enacted(true).message("No TBR active");
/*
.success(true)
.enacted(true) // technically, nothing was enacted, but AAPS needs this to recover