|
@@ -30,6 +30,10 @@
|
30
|
30
|
|
31
|
31
|
#include "spindle_laser_types.h"
|
32
|
32
|
|
|
33
|
+#if USE_BEEPER
|
|
34
|
+ #include "../libs/buzzer.h"
|
|
35
|
+#endif
|
|
36
|
+
|
33
|
37
|
#if ENABLED(LASER_POWER_INLINE)
|
34
|
38
|
#include "../module/planner.h"
|
35
|
39
|
#endif
|
|
@@ -90,6 +94,10 @@ public:
|
90
|
94
|
static const cutter_power_t mpower_min() { return cpwr_to_upwr(SPEED_POWER_MIN); }
|
91
|
95
|
static const cutter_power_t mpower_max() { return cpwr_to_upwr(SPEED_POWER_MAX); }
|
92
|
96
|
|
|
97
|
+ #if ENABLED(LASER_FEATURE)
|
|
98
|
+ static cutter_test_pulse_t testPulse; // Test fire Pulse ms value
|
|
99
|
+ #endif
|
|
100
|
+
|
93
|
101
|
static bool isReady; // Ready to apply power setting from the UI to OCR
|
94
|
102
|
static uint8_t power;
|
95
|
103
|
|
|
@@ -230,7 +238,21 @@ public:
|
230
|
238
|
}
|
231
|
239
|
#endif
|
232
|
240
|
|
233
|
|
- #endif
|
|
241
|
+ #if ENABLED(LASER_FEATURE)
|
|
242
|
+ /**
|
|
243
|
+ * Test fire the laser using the testPulse ms duration
|
|
244
|
+ * Also fires with any PWM power that was previous set
|
|
245
|
+ * If not set defaults to 80% power
|
|
246
|
+ */
|
|
247
|
+ static inline void test_fire_pulse() {
|
|
248
|
+ enable_forward(); // Turn Laser on (Spindle speak but same funct)
|
|
249
|
+ TERN_(USE_BEEPER, buzzer.tone(30, 3000));
|
|
250
|
+ delay(testPulse); // Delay for time set by user in pulse ms menu screen.
|
|
251
|
+ disable(); // Turn laser off
|
|
252
|
+ }
|
|
253
|
+ #endif
|
|
254
|
+
|
|
255
|
+ #endif // HAS_LCD_MENU
|
234
|
256
|
|
235
|
257
|
#if ENABLED(LASER_POWER_INLINE)
|
236
|
258
|
/**
|