Browse Source

🐛 Fix HAS_KILL && SOFT_RESET_ON_KILL soft reset button logic (#22269)

Skruppy 4 years ago
parent
commit
e487900069
No account linked to committer's email address
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/src/MarlinCore.cpp

+ 3
- 3
Marlin/src/MarlinCore.cpp View File

890
   #if EITHER(HAS_KILL, SOFT_RESET_ON_KILL)
890
   #if EITHER(HAS_KILL, SOFT_RESET_ON_KILL)
891
 
891
 
892
     // Wait for both KILL and ENC to be released
892
     // Wait for both KILL and ENC to be released
893
-    while (TERN0(HAS_KILL, !kill_state()) || TERN0(SOFT_RESET_ON_KILL, !ui.button_pressed()))
893
+    while (TERN0(HAS_KILL, kill_state()) || TERN0(SOFT_RESET_ON_KILL, ui.button_pressed()))
894
       watchdog_refresh();
894
       watchdog_refresh();
895
 
895
 
896
-    // Wait for either KILL or ENC press
897
-    while (TERN1(HAS_KILL, kill_state()) && TERN1(SOFT_RESET_ON_KILL, ui.button_pressed()))
896
+    // Wait for either KILL or ENC to be pressed again
897
+    while (TERN1(HAS_KILL, !kill_state()) && TERN1(SOFT_RESET_ON_KILL, !ui.button_pressed()))
898
       watchdog_refresh();
898
       watchdog_refresh();
899
 
899
 
900
     // Reboot the board
900
     // Reboot the board

Loading…
Cancel
Save