2d0d90a2ded2393f56181603c6c0cded0e13a0b4
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/>.
11 #include "libs/Module.h"
12 #include "PwmOut.h" // mbed.h lib
13 #include "libs/Kernel.h"
14 #include "modules/communication/utils/Gcode.h"
17 #define laser_module_enable_checksum 35529
18 #define laser_module_max_power_checksum 14134
19 #define laser_module_tickle_power_checksum 63341
21 class Laser
: public Module
{
24 void on_module_loaded();
25 void on_block_end(void* argument
);
26 void on_block_begin(void* argument
);
27 void on_play(void* argument
);
28 void on_pause(void* argument
);
29 void on_gcode_execute(void* argument
);
30 void on_speed_change(void* argument
);
31 void set_proportional_power();
33 mbed::PwmOut
* laser_pin
; // PWM output to regulate the laser power
34 bool laser_on
; // Laser status
35 float laser_max_power
; // maximum allowed laser power to be output on the pwm pin
36 float laser_tickle_power
; // value used to tickle the laser on moves