A complete refactor of the old spindle control module.
[clinton/Smoothieware.git] / src / modules / tools / spindle / SpindleControl.h
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 SPINDLE_CONTROL_MODULE_H
9 #define SPINDLE_CONTROL_MODULE_H
10
11 #include "libs/Module.h"
12
13 class SpindleControl: public Module {
14 public:
15 SpindleControl() {};
16 virtual ~SpindleControl() {};
17 virtual void on_module_loaded() {};
18
19 protected:
20 bool spindle_on;
21
22 private:
23 void on_gcode_received(void *argument);
24 void on_gcode_execute(void *argument);
25
26 virtual void turn_on(void) {};
27 virtual void turn_off(void) {};
28 virtual void set_speed(int) {};
29 virtual void report_speed(void) {};
30 virtual void set_p_term(float) {};
31 virtual void set_i_term(float) {};
32 virtual void set_d_term(float) {};
33 virtual void get_pid_settings(void) {};
34 };
35
36 #endif