laser was broken, lines missing at the end of files
[clinton/Smoothieware.git] / src / modules / tools / laser / Laser.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 LASER_MODULE_H
9 #define LASER_MODULE_H
10
11 #include "libs/Module.h"
12 #include "PwmOut.h" // mbed.h lib
13 #include "libs/Kernel.h"
14 #include "modules/communication/utils/Gcode.h"
15
16
17 #define laser_module_enable_checksum 35529
18 #define laser_module_max_power_checksum 14134
19
20 class Laser : public Module{
21 public:
22 Laser(PinName pin);
23 void on_module_loaded();
24 void on_block_end(void* argument);
25 void on_block_begin(void* argument);
26 void on_play(void* argument);
27 void on_pause(void* argument);
28 void on_gcode_execute(void* argument);
29 void on_speed_change(void* argument);
30 void set_proportional_power();
31
32 mbed::PwmOut laser_pin; // PWM output to regulate the laser power
33 bool laser_on; // Laser status
34 float laser_max_power; // maximum allowed laser power to be output on the pwm pin
35 };
36
37
38
39
40 #endif
41
42
43
44
45
46
47
48
49
50
51
52
53