ignore ! and ~ as pause and resume do not work
authorJim Morris <morris@wolfman.com>
Sun, 11 Dec 2016 01:35:28 +0000 (17:35 -0800)
committerJim Morris <morris@wolfman.com>
Sun, 11 Dec 2016 01:35:28 +0000 (17:35 -0800)
src/libs/Kernel.h
src/libs/USBDevice/USBSerial/USBSerial.cpp
src/modules/utils/panel/screens/cnc/WatchScreen.cpp

index b5b3eb5..81dd6ce 100644 (file)
@@ -51,8 +51,8 @@ class Kernel {
         bool is_grbl_mode() const { return grbl_mode; }
         bool is_ok_per_line() const { return ok_per_line; }
 
-        void set_feed_hold(bool f) { feed_hold= f; }
-        bool get_feed_hold() const { return feed_hold; }
+        // void set_feed_hold(bool f) { feed_hold= f; }
+        // bool get_feed_hold() const { return feed_hold; }
 
         std::string get_query_string();
 
index 42849e6..5e53459 100644 (file)
@@ -188,7 +188,7 @@ bool USBSerial::USBEvent_EPOut(uint8_t bEP, uint8_t bEPStatus)
         }
 
         if(c[i] == 'X' - 'A' + 1) { // ^X
-            THEKERNEL->set_feed_hold(false); // required to free stuff up
+            //THEKERNEL->set_feed_hold(false); // required to free stuff up
             halt_flag = true;
             continue;
         }
@@ -200,18 +200,18 @@ bool USBSerial::USBEvent_EPOut(uint8_t bEP, uint8_t bEPStatus)
 
         if(THEKERNEL->is_grbl_mode()) {
             if(c[i] == '!') { // safe pause
-                THEKERNEL->set_feed_hold(true);
+                //THEKERNEL->set_feed_hold(true);
                 continue;
             }
 
             if(c[i] == '~') { // safe resume
-                THEKERNEL->set_feed_hold(false);
+                //THEKERNEL->set_feed_hold(false);
                 continue;
             }
-            if(last_char_was_dollar && (c[i] == 'X' || c[i] == 'H')) {
-                // we need to do this otherwise $X/$H won't work if there was a feed hold like when stop is clicked in bCNC
-                THEKERNEL->set_feed_hold(false);
-            }
+            // if(last_char_was_dollar && (c[i] == 'X' || c[i] == 'H')) {
+            //     // we need to do this otherwise $X/$H won't work if there was a feed hold like when stop is clicked in bCNC
+            //     THEKERNEL->set_feed_hold(false);
+            // }
         }
 
         last_char_was_dollar = (c[i] == '$');
@@ -319,7 +319,7 @@ void USBSerial::on_main_loop(void *argument)
     }
 
     // if we are in feed hold we do not process anything
-    if(THEKERNEL->get_feed_hold()) return;
+    //if(THEKERNEL->get_feed_hold()) return;
 
     if (nl_in_rx) {
         string received;
index 84e3a09..558b928 100644 (file)
@@ -215,8 +215,8 @@ const char *WatchScreen::get_status()
     if (THEKERNEL->is_halted())
         return "ALARM";
 
-    if (THEPANEL->is_suspended() || THEKERNEL->get_feed_hold())
-        return "Feed Hold";
+    if (THEPANEL->is_suspended() /*|| THEKERNEL->get_feed_hold()*/)
+        return "Suspended";
 
     if (THEPANEL->is_playing())
         return THEPANEL->get_playing_file();