Commit | Line | Data |
---|---|---|
88443c6b JM |
1 | /* |
2 | This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl). | |
3 | Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | |
4 | Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |
5 | You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>. | |
6 | */ | |
7 | ||
8 | #ifndef ZPROBE_H_ | |
9 | #define ZPROBE_H_ | |
10 | ||
11 | #include "Module.h" | |
12 | #include "Pin.h" | |
13 | ||
14 | class StepperMotor; | |
fc7b9a7b | 15 | class Gcode; |
681a62d7 | 16 | class StreamOutput; |
88443c6b JM |
17 | |
18 | class ZProbe: public Module | |
19 | { | |
20 | ||
21 | public: | |
22 | void on_module_loaded(); | |
23 | void on_config_reload(void *argument); | |
24 | void on_gcode_received(void *argument); | |
88443c6b JM |
25 | uint32_t acceleration_tick(uint32_t dummy); |
26 | ||
27 | ||
28 | private: | |
681a62d7 JM |
29 | bool wait_for_probe(int steps[3]); |
30 | bool run_probe(int& steps, bool fast= false); | |
31 | bool probe_delta_tower(int& steps, float x, float y); | |
32 | bool return_probe(int steps); | |
037c350d JM |
33 | bool calibrate_delta_endstops(Gcode *gcode); |
34 | bool calibrate_delta_radius(Gcode *gcode); | |
35 | void coordinated_move(float x, float y, float z, float feedrate, bool relative=false); | |
681a62d7 | 36 | void home(); |
7d6fe308 JM |
37 | bool set_trim(float x, float y, float z, StreamOutput *stream); |
38 | bool get_trim(float& x, float& y, float& z); | |
681a62d7 | 39 | |
681a62d7 JM |
40 | float probe_radius; |
41 | float probe_height; | |
42 | float current_feedrate; | |
43 | float slow_feedrate; | |
44 | float fast_feedrate; | |
88443c6b | 45 | Pin pin; |
56ce2b5a | 46 | uint8_t debounce_count; |
7d6fe308 JM |
47 | struct { |
48 | bool running:1; | |
49 | bool is_delta:1; | |
50 | }; | |
88443c6b JM |
51 | }; |
52 | ||
53 | #endif /* ZPROBE_H_ */ |