Fork of Smoothie to port to mbed non-LPC targets.
Fork of Smoothie by
Conveyor.h
00001 /* 00002 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl). 00003 Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 00004 Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 00005 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>. 00006 */ 00007 00008 #ifndef CONVEYOR_H 00009 #define CONVEYOR_H 00010 00011 #include "libs/Module.h" 00012 #include "libs/Kernel.h" 00013 #include "HeapRing.h" 00014 00015 using namespace std; 00016 #include <string> 00017 #include <vector> 00018 00019 class Gcode; 00020 00021 class Conveyor : public Module 00022 { 00023 public: 00024 Conveyor(); 00025 00026 void on_module_loaded(void); 00027 void on_idle(void*); 00028 void on_main_loop(void*); 00029 void on_block_end(void*); 00030 void on_config_reload(void*); 00031 00032 void notify_block_finished(Block*); 00033 00034 void wait_for_empty_queue(); 00035 00036 void ensure_running(void); 00037 00038 void append_gcode(Gcode*); 00039 void queue_head_block(void); 00040 00041 void dump_queue(void); 00042 00043 // right now block queue size can only be changed at compile time by changing the value below 00044 typedef HeapRing<Block> Queue_t; 00045 00046 Queue_t queue; // Queue of Blocks 00047 00048 volatile bool running; 00049 00050 volatile unsigned int gc_pending; 00051 }; 00052 00053 #endif // CONVEYOR_H
Generated on Tue Jul 12 2022 20:09:00 by 1.7.2