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 tbrPercent = -1;
|
||||||
public int tbrRemainingDuration = -1;
|
public int tbrRemainingDuration = -1;
|
||||||
public boolean isErrorOrWarning = false;
|
public boolean isErrorOrWarning = false;
|
||||||
public int errorCode = -1;
|
public String errorMsg;
|
||||||
|
|
||||||
public PumpState tbrActive(boolean tbrActive) {
|
public PumpState tbrActive(boolean tbrActive) {
|
||||||
this.tbrActive = tbrActive;
|
this.tbrActive = tbrActive;
|
||||||
|
@ -33,8 +33,8 @@ public class PumpState {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PumpState errorCode(int errorCode) {
|
public PumpState errorMsg(String errorMsg) {
|
||||||
this.errorCode = errorCode;
|
this.errorMsg = errorMsg;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public class PumpState {
|
||||||
", tbrPercent=" + tbrPercent +
|
", tbrPercent=" + tbrPercent +
|
||||||
", tbrRemainingDuration=" + tbrRemainingDuration +
|
", tbrRemainingDuration=" + tbrRemainingDuration +
|
||||||
", isErrorOrWarning=" + isErrorOrWarning +
|
", isErrorOrWarning=" + isErrorOrWarning +
|
||||||
", errorCode=" + errorCode +
|
", errorMsg=" + errorMsg +
|
||||||
", timestamp=" + timestamp +
|
", timestamp=" + timestamp +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class ReadStateCommand implements Command {
|
||||||
}
|
}
|
||||||
} else if (displayedMenuType == MenuType.WARNING_OR_ERROR) {
|
} else if (displayedMenuType == MenuType.WARNING_OR_ERROR) {
|
||||||
state.isErrorOrWarning = true;
|
state.isErrorOrWarning = true;
|
||||||
state.errorCode = (int) displayedMenu.getAttribute(MenuAttribute.ERROR);
|
state.errorMsg = (String) displayedMenu.getAttribute(MenuAttribute.MESSAGE);
|
||||||
} else {
|
} else {
|
||||||
throw new CommandException().success(false).message("Neither MAIN_MENU nor WARNING_OR_ERROR is displayed, but " + displayedMenuType);
|
throw new CommandException().success(false).message("Neither MAIN_MENU nor WARNING_OR_ERROR is displayed, but " + displayedMenuType);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue