initial attempt to implement a feedhold.
[clinton/Smoothieware.git] / src / libs / USBDevice / USBSerial / USBSerial.cpp
index 42849e6..cd7ab1f 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;
         }
@@ -208,10 +208,6 @@ bool USBSerial::USBEvent_EPOut(uint8_t bEP, uint8_t bEPStatus)
                 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);
-            }
         }
 
         last_char_was_dollar = (c[i] == '$');
@@ -283,7 +279,7 @@ void USBSerial::on_idle(void *argument)
         halt_flag = false;
         THEKERNEL->call_event(ON_HALT, nullptr);
         if(THEKERNEL->is_grbl_mode()) {
-            puts("ALARM:Abort during cycle\r\n");
+            puts("ALARM: Abort during cycle\r\n");
         } else {
             puts("HALTED, M999 or $X to exit HALT state\r\n");
         }
@@ -319,7 +315,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;