Commit | Line | Data |
---|---|---|
97832d6d JM |
1 | #ifndef _THREEPOINTSTRATEGY |
2 | #define _THREEPOINTSTRATEGY | |
3 | ||
4 | #include "LevelingStrategy.h" | |
5 | ||
6 | #include <string.h> | |
0e44e7d7 | 7 | #include <tuple> |
97832d6d JM |
8 | |
9 | #define three_point_leveling_strategy_checksum CHECKSUM("three-point-leveling") | |
10 | ||
11 | class StreamOutput; | |
a5542cae | 12 | class Plane3D; |
97832d6d JM |
13 | |
14 | class ThreePointStrategy : public LevelingStrategy | |
15 | { | |
16 | public: | |
a5542cae JM |
17 | ThreePointStrategy(ZProbe *zprobe); |
18 | ~ThreePointStrategy(); | |
97832d6d JM |
19 | bool handleGcode(Gcode* gcode); |
20 | bool handleConfig(); | |
0e44e7d7 | 21 | float getZOffset(float x, float y); |
97832d6d JM |
22 | |
23 | private: | |
ff7e9858 | 24 | void homeXY(); |
0e44e7d7 JM |
25 | bool doProbing(StreamOutput *stream); |
26 | std::tuple<float, float> parseXY(const char *str); | |
cef9acea | 27 | std::tuple<float, float, float> parseXYZ(const char *str); |
14568182 | 28 | void setAdjustFunction(bool); |
d5f17053 | 29 | bool test_probe_points(Gcode *gcode); |
0e44e7d7 | 30 | |
cef9acea | 31 | std::tuple<float, float, float> probe_offsets; |
0e44e7d7 JM |
32 | std::tuple<float, float> probe_points[3]; |
33 | Plane3D *plane; | |
5fdf2c47 JM |
34 | struct { |
35 | bool home:1; | |
230079d4 | 36 | bool save:1; |
5fdf2c47 JM |
37 | }; |
38 | float tolerance; | |
97832d6d JM |
39 | }; |
40 | ||
41 | #endif |