Various Laser / Spindle improvements (#15335)
This commit is contained in:
@@ -53,6 +53,10 @@ GcodeSuite gcode;
|
||||
#include "../feature/cancel_object.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(LASER_MOVE_POWER)
|
||||
#include "../feature/spindle_laser.h"
|
||||
#endif
|
||||
|
||||
#include "../MarlinCore.h" // for idle()
|
||||
|
||||
millis_t GcodeSuite::previous_move_ms;
|
||||
@@ -172,6 +176,18 @@ void GcodeSuite::get_destination_from_command() {
|
||||
#if BOTH(MIXING_EXTRUDER, DIRECT_MIXING_IN_G1)
|
||||
M165();
|
||||
#endif
|
||||
|
||||
#if ENABLED(LASER_MOVE_POWER)
|
||||
// Set the laser power in the planner to configure this move
|
||||
if (parser.seen('S'))
|
||||
cutter.inline_power(parser.value_int());
|
||||
else {
|
||||
#if ENABLED(LASER_MOVE_G0_OFF)
|
||||
if (parser.codenum == 0) // G0
|
||||
cutter.inline_enabled(false);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user