added wait for empty queue back to toolchange
authorLogxen <logxen@hotmail.com>
Sun, 18 May 2014 00:28:48 +0000 (17:28 -0700)
committerLogxen <logxen@hotmail.com>
Sun, 18 May 2014 00:28:48 +0000 (17:28 -0700)
src/modules/tools/toolmanager/ToolManager.cpp

index 412e70a..9a39af2 100644 (file)
@@ -67,6 +67,7 @@ void ToolManager::on_gcode_received(void *argument){
             }
         } else {
             if(new_tool != this->active_tool){
+                THEKERNEL->conveyor->wait_for_empty_queue();
                 this->tools[active_tool]->disable();
                 this->active_tool = new_tool;
                 this->current_tool_name = this->tools[active_tool]->get_name();