Merge pull request #219 from wolfmanjm/fix/pid2
[clinton/Smoothieware.git] / src / modules / robot / arm_solutions / RotatableCartesianSolution.h
1 #ifndef ROTATABLECARTESIANSOLUTION_H
2 #define ROTATABLECARTESIANSOLUTION_H
3 #include "libs/Module.h"
4 #include "libs/Kernel.h"
5 #include "BaseSolution.h"
6 #include "libs/nuts_bolts.h"
7
8 #include "libs/Config.h"
9
10 #define alpha_steps_per_mm_checksum CHECKSUM("alpha_steps_per_mm")
11 #define beta_steps_per_mm_checksum CHECKSUM("beta_steps_per_mm")
12 #define gamma_steps_per_mm_checksum CHECKSUM("gamma_steps_per_mm")
13
14 #define alpha_angle_checksum CHECKSUM("alpha_angle")
15
16 class RotatableCartesianSolution : public BaseSolution {
17 public:
18 RotatableCartesianSolution(Config* passed_config);
19 void millimeters_to_steps( double millimeters[], int steps[] );
20 void steps_to_millimeters( int steps[], double millimeters[] );
21
22 void set_steps_per_millimeter( double steps[] );
23 void get_steps_per_millimeter( double steps[] );
24
25 void rotate( double in[], double out[], double sin, double cos );
26
27 Config* config;
28 double alpha_steps_per_mm;
29 double beta_steps_per_mm;
30 double gamma_steps_per_mm;
31
32 double sin_alpha;
33 double cos_alpha;
34 };
35
36
37 #endif // ROTATABLECARTESIANSOLUTION_H
38