Update PumpState s/errorCode/errorMsg/g
This commit is contained in:
parent
99830b05b6
commit
7e538cbcf6
2 changed files with 5 additions and 5 deletions
|
@ -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 +
|
||||
'}';
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue