update firmware.bin
[clinton/Smoothieware.git] / src / modules / tools / zprobe / ThreePointStrategy.h
1 #ifndef _THREEPOINTSTRATEGY
2 #define _THREEPOINTSTRATEGY
3
4 #include "LevelingStrategy.h"
5
6 #include <string.h>
7 #include <tuple>
8
9 #define three_point_leveling_strategy_checksum CHECKSUM("three-point-leveling")
10
11 class StreamOutput;
12 class Plane3D;
13
14 class ThreePointStrategy : public LevelingStrategy
15 {
16 public:
17 ThreePointStrategy(ZProbe *zprobe);
18 ~ThreePointStrategy();
19 bool handleGcode(Gcode* gcode);
20 bool handleConfig();
21 float getZOffset(float x, float y);
22
23 private:
24 void homeXY();
25 bool doProbing(StreamOutput *stream);
26 std::tuple<float, float> parseXY(const char *str);
27 std::tuple<float, float, float> parseXYZ(const char *str);
28 void setAdjustFunction(bool);
29
30 std::tuple<float, float, float> probe_offsets;
31 std::tuple<float, float> probe_points[3];
32 Plane3D *plane;
33 struct {
34 bool home:1;
35 bool save:1;
36 };
37 float tolerance;
38 };
39
40 #endif