Update PumpState s/errorCode/errorMsg/g

This commit is contained in:
Johannes Mockenhaupt 2017-07-15 16:57:56 +02:00
parent 99830b05b6
commit 7e538cbcf6
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 5 additions and 5 deletions

View file

@ -11,7 +11,7 @@ public class PumpState {
public int tbrPercent = -1;
public int tbrRemainingDuration = -1;
public boolean isErrorOrWarning = false;
public int errorCode = -1;
public String errorMsg;
public PumpState tbrActive(boolean tbrActive) {
this.tbrActive = tbrActive;
@ -33,8 +33,8 @@ public class PumpState {
return this;
}
public PumpState errorCode(int errorCode) {
this.errorCode = errorCode;
public PumpState errorMsg(String errorMsg) {
this.errorMsg = errorMsg;
return this;
}
@ -45,7 +45,7 @@ public class PumpState {
", tbrPercent=" + tbrPercent +
", tbrRemainingDuration=" + tbrRemainingDuration +
", isErrorOrWarning=" + isErrorOrWarning +
", errorCode=" + errorCode +
", errorMsg=" + errorMsg +
", timestamp=" + timestamp +
'}';
}

View file

@ -29,7 +29,7 @@ public class ReadStateCommand implements Command {
}
} else if (displayedMenuType == MenuType.WARNING_OR_ERROR) {
state.isErrorOrWarning = true;
state.errorCode = (int) displayedMenu.getAttribute(MenuAttribute.ERROR);
state.errorMsg = (String) displayedMenu.getAttribute(MenuAttribute.MESSAGE);
} else {
throw new CommandException().success(false).message("Neither MAIN_MENU nor WARNING_OR_ERROR is displayed, but " + displayedMenuType);
}