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/>.
8 #ifndef ENDSTOPS_MODULE_H
9 #define ENDSTOPS_MODULE_H
11 #include "libs/Module.h"
12 #include "libs/Kernel.h"
13 #include "modules/communication/utils/Gcode.h"
14 #include "libs/StepperMotor.h"
18 class Endstops
: public Module
{
21 void on_module_loaded();
22 void on_gcode_received(void* argument
);
23 void on_config_reload(void* argument
);
26 void do_homing(char axes_to_move
);
27 void do_homing_corexy(char axes_to_move
);
28 void wait_for_homed(char axes_to_move
);
29 void wait_for_homed_corexy(int axis
);
30 void corexy_home(int home_axis
, bool dirx
, bool diry
, double fast_rate
, double slow_rate
, unsigned int retract_steps
);
31 void trim2mm(double * mm
);
33 double steps_per_mm
[3];
34 double homing_position
[3];
36 bool home_direction
[3];
37 unsigned int debounce_count
;
38 unsigned int retract_steps
[3];
43 StepperMotor
* steppers
[3];