Merge remote-tracking branch 'upstream/edge' into upstream-master
[clinton/Smoothieware.git] / src / modules / tools / scaracal / SCARAcal.h
CommitLineData
ed866a4b
QH
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 SCARACAL_H_
9#define SCARACAL_H_
10
11#include "Module.h"
12#include "Pin.h"
13
14class StepperMotor;
15class Gcode;
16class StreamOutput;
17
18class SCARAcal: public Module
19{
20
21public:
22 void on_module_loaded();
23 void on_config_reload(void *argument);
24
25 void on_gcode_received(void *argument);
ed866a4b
QH
26
27
28private:
29 void home();
30 bool set_trim(float x, float y, float z, StreamOutput *stream);
31 bool get_trim(float& x, float& y, float& z);
32
157d2308
QH
33 bool set_home_offset(float x, float y, float z, StreamOutput *stream);
34 bool get_home_offset(float& x, float& y, float& z);
35
36 bool translate_trim(StreamOutput *stream);
37
ed866a4b
QH
38 void SCARA_ang_move(float theta, float psi, float z, float feedrate);
39
40 float slow_rate;
ad274785 41 float z_move;
ed866a4b
QH
42
43 struct {
44 bool is_scara:1;
45 };
46};
47
48#endif /* SCARACAL_H_ */