Merge remote-tracking branch 'upstream/edge' into merge-abc-with-homing
[clinton/Smoothieware.git] / src / modules / tools / zprobe / DeltaGridStrategy.h
CommitLineData
59d4d4ea
JM
1#pragma once
2
3#include "LevelingStrategy.h"
4
5#include <string.h>
6#include <tuple>
7
e9f69a35 8#define delta_grid_leveling_strategy_checksum CHECKSUM("delta-grid")
59d4d4ea
JM
9
10class StreamOutput;
11class Gcode;
12
13class DeltaGridStrategy : public LevelingStrategy
14{
15public:
16 DeltaGridStrategy(ZProbe *zprobe);
17 ~DeltaGridStrategy();
18 bool handleGcode(Gcode* gcode);
19 bool handleConfig();
20
21private:
22
23 void extrapolate_one_point(int x, int y, int xdir, int ydir);
24 void extrapolate_unprobed_bed_level();
25 bool doProbe(Gcode *gc);
26 float findBed();
27 void setAdjustFunction(bool on);
28 void print_bed_level(StreamOutput *stream);
8fe38353 29 void doCompensation(float *target, bool inverse);
59d4d4ea 30 void reset_bed_level();
e9f69a35 31 void save_grid(StreamOutput *stream);
c5e0c263 32 bool load_grid(StreamOutput *stream);
95b8e3f2
JM
33 bool probe_spiral(int n, float radius, StreamOutput *stream);
34 bool probe_grid(int n, float radius, StreamOutput *stream);
59d4d4ea
JM
35
36 float initial_height;
37 float tolerance;
cf6b8fd1 38
3b4faa5e 39 float *grid;
59d4d4ea
JM
40 float grid_radius;
41 std::tuple<float, float, float> probe_offsets;
3b4faa5e 42 uint8_t grid_size;
dbe510e8 43 float x_max,y_max;
59d4d4ea
JM
44
45 struct {
46 bool save:1;
dbe510e8 47 bool do_home:1;
dbe510e8
JL
48 bool is_square:1;
49 };
59d4d4ea 50};