remove unsupported touchprobe module, has been archived in branch archive/touchprobe
[clinton/Smoothieware.git] / src / modules / robot / Planner.h
index 648dee8..79648b5 100644 (file)
@@ -8,31 +8,31 @@
 #ifndef PLANNER_H
 #define PLANNER_H
 
-#include <vector>
-#include "libs/RingBuffer.h"
-#include "../communication/utils/Gcode.h"
-#include "Block.h"
-
-using namespace std;
-
-class Planner : public Module {
-    public:
-        Planner();
-        void append_block( float target[], float feed_rate, float distance, float unit_vec[] );
-        float max_allowable_speed( float acceleration, float target_velocity, float distance);
-        void recalculate();
-        Block* get_current_block();
-        void cleanup_queue();
-        void on_module_loaded();
-        void on_config_reload(void* argument);
-
-        float previous_unit_vec[3];
-        Block last_deleted_block;     // Item -1 in the queue, TODO: Grbl does not need this, but Smoothie won't work without it, we are probably doing something wrong
-        bool has_deleted_block;       // Flag for above value
-
-        float acceleration;          // Setting
-        float junction_deviation;    // Setting
-        float minimum_planner_speed; // Setting
+#include "ActuatorCoordinates.h"
+class Block;
+
+class Planner
+{
+public:
+    Planner();
+    void append_block(ActuatorCoordinates &target, float rate_mm_s, float distance, float unit_vec[] );
+    float max_allowable_speed( float acceleration, float target_velocity, float distance);
+    void recalculate();
+    Block *get_current_block();
+    void cleanup_queue();
+    float get_acceleration() const { return acceleration; }
+    float get_z_acceleration() const { return z_acceleration > 0.0F ? z_acceleration : acceleration; }
+
+    friend class Robot; // for acceleration, junction deviation, minimum_planner_speed
+
+private:
+    void config_load();
+    float previous_unit_vec[3];
+    float acceleration;          // Setting
+    float z_acceleration;        // Setting
+    float junction_deviation;    // Setting
+    float z_junction_deviation;  // Setting
+    float minimum_planner_speed; // Setting
 };