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/>.
16 // defined here as they are used in multiple files
17 #define zprobe_checksum CHECKSUM("zprobe")
18 #define leveling_strategy_checksum CHECKSUM("leveling-strategy")
23 class LevelingStrategy
;
25 class ZProbe
: public Module
29 void on_module_loaded();
30 void on_config_reload(void *argument
);
31 void on_gcode_received(void *argument
);
32 void acceleration_tick(void);
34 bool wait_for_probe(int& steps
);
35 bool run_probe(int& steps
, bool fast
= false);
36 bool return_probe(int steps
);
37 bool doProbeAt(int &steps
, float x
, float y
);
38 float probeDistance(float x
, float y
);
40 void coordinated_move(float x
, float y
, float z
, float feedrate
, bool relative
=false);
43 bool getProbeStatus() { return this->pin
.get(); }
44 float getSlowFeedrate() { return slow_feedrate
; }
45 float getFastFeedrate() { return fast_feedrate
; }
46 float getProbeHeight() { return probe_height
; }
47 float zsteps_to_mm(float steps
);
50 void accelerate(int c
);
52 volatile float current_feedrate
;
58 volatile bool running
:1;
63 uint8_t debounce_count
;
64 std::vector
<LevelingStrategy
*> strategies
;
67 #endif /* ZPROBE_H_ */