Change Conveyor,Planner,Block to use HeapRing
[clinton/Smoothieware.git] / src / modules / robot / Conveyor.h
index 0ef79ce..267938d 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "libs/Module.h"
 #include "libs/Kernel.h"
+#include "HeapRing.h"
 
 using namespace std;
 #include <string>
@@ -35,12 +36,14 @@ public:
     void append_gcode(Gcode*);
 
     // right now block queue size can only be changed at compile time by changing the value below
-    typedef RingBuffer<Block, 32> BlockQueue_t;
-    BlockQueue_t queue;  // Queue of Blocks
+    typedef HeapRing<Block> Queue_t;
+
+    Queue_t queue;  // Queue of Blocks
+
     Block *current_block;
     bool looking_for_new_block;
 
-    volatile int flush_blocks;
+    volatile unsigned int gc_pending;
 };
 
 #endif // CONVEYOR_H