Skip to content

Commit

Permalink
Made soft reset action available on alarms
Browse files Browse the repository at this point in the history
  • Loading branch information
breiler committed Jan 17, 2022
1 parent f4fcaf4 commit 59d7160
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This file is part of Universal Gcode Sender (UGS).

import com.willwinder.ugs.nbp.lib.lookup.CentralLookup;
import com.willwinder.ugs.nbp.lib.services.LocalizingService;
import com.willwinder.universalgcodesender.listeners.ControllerState;
import com.willwinder.universalgcodesender.listeners.UGSEventListener;
import com.willwinder.universalgcodesender.model.BackendAPI;
import com.willwinder.universalgcodesender.model.UGSEvent;
Expand Down Expand Up @@ -77,7 +78,10 @@ public void UGSEvent(UGSEvent cse) {

@Override
public boolean isEnabled() {
return backend.isIdle() || backend.isPaused();
return backend.getControllerState() == ControllerState.IDLE ||
backend.getControllerState() == ControllerState.HOLD ||
backend.getControllerState() == ControllerState.CHECK ||
backend.getControllerState() == ControllerState.ALARM;
}

@Override
Expand Down

0 comments on commit 59d7160

Please sign in to comment.