Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
fix machine working when suspend
Browse files Browse the repository at this point in the history
  • Loading branch information
vfyjxf committed Nov 18, 2023
1 parent 7f72f66 commit fbfce90
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public void update() {
if (getStatus() == Status.SUSPEND && timer % 5 == 0) {
checkAsyncRecipeSearching(this::handleRecipeWorking);
} else {
handleRecipeWorking();
if (getStatus() == Status.WORKING) {
handleRecipeWorking();
}
if (progress == duration) {
onRecipeFinish();
}
Expand Down Expand Up @@ -204,15 +206,15 @@ public Status getStatus() {
return status;
}

public boolean isWorking(){
public boolean isWorking() {
return status == Status.WORKING;
}

public boolean isIdle(){
public boolean isIdle() {
return status == Status.IDLE;
}

public boolean isSuspend(){
public boolean isSuspend() {
return status == Status.SUSPEND;
}

Expand Down Expand Up @@ -270,6 +272,7 @@ public enum Status {
SUSPEND("suspend");

public String name;

Status(String name) {
this.name = name;
}
Expand Down

0 comments on commit fbfce90

Please sign in to comment.