Skip to content

Commit d2ca90a

Browse files
authored
Make it possible to reset controller in sleep mode (#2790)
1 parent 4d87717 commit d2ca90a

File tree

2 files changed

+3
-2
lines changed
  • ugs-core/src/com/willwinder/universalgcodesender
  • ugs-platform/ugs-platform-ugscore/src/main/java/com/willwinder/ugs/nbp/core/actions

2 files changed

+3
-2
lines changed

ugs-core/src/com/willwinder/universalgcodesender/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public static String getControllerStateText(ControllerState state) {
104104
public static Color getControllerStateBackgroundColor(ControllerState state) {
105105
if (state == ControllerState.ALARM) {
106106
return ThemeColors.RED;
107-
} else if (state == ControllerState.HOLD) {
107+
} else if (state == ControllerState.HOLD || state == ControllerState.SLEEP) {
108108
return ThemeColors.ORANGE;
109109
} else if (state == ControllerState.DOOR) {
110110
return ThemeColors.ORANGE;

ugs-platform/ugs-platform-ugscore/src/main/java/com/willwinder/ugs/nbp/core/actions/SoftResetAction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ public boolean isEnabled() {
8686
return backend.getControllerState() == ControllerState.IDLE ||
8787
backend.getControllerState() == ControllerState.HOLD ||
8888
backend.getControllerState() == ControllerState.CHECK ||
89-
backend.getControllerState() == ControllerState.ALARM;
89+
backend.getControllerState() == ControllerState.ALARM ||
90+
backend.getControllerState() == ControllerState.SLEEP;
9091
}
9192

9293
@Override

0 commit comments

Comments
 (0)