// The kernel is the central point in Smoothie : it stores modules, and handles event calls
Kernel::Kernel(){
halted= false;
+ feed_hold= false;
instance= this; // setup the Singleton instance of the kernel
str.append("Alarm,");
}else if(homing) {
str.append("Home,");
+ }else if(feed_hold) {
+ str.append("Hold,");
}else if(this->conveyor->is_queue_empty()) {
str.append("Idle,");
}else{
bool is_halted() const { return halted; }
bool is_grbl_mode() const { return grbl_mode; }
+ void set_feed_hold(bool f) { feed_hold= f; }
+ bool get_feed_hold() const { return feed_hold; }
+
std::string get_query_string();
// These modules are available to all other modules
bool use_leds:1;
bool halted:1;
bool grbl_mode:1;
+ bool feed_hold:1;
};
};
continue;\r
}\r
\r
+ if(c[i] == '!'){ // safe pause\r
+ THEKERNEL->set_feed_hold(true);\r
+ continue;\r
+ }\r
+\r
+ if(c[i] == '~'){ // safe resume\r
+ THEKERNEL->set_feed_hold(false);\r
+ continue;\r
+ }\r
+\r
if (flush_to_nl == false)\r
rxbuf.queue(c[i]);\r
\r
nl_in_rx = 0;\r
}\r
}\r
+\r
+ // if we are in feed hold we do not process anything\r
+ if(THEKERNEL->get_feed_hold()) return;\r
+\r
if (nl_in_rx)\r
{\r
string received;\r