Improvements for Laser / Spindle (#17661)

This commit is contained in:
Luu Lac
2020-06-08 00:47:31 -05:00
committed by GitHub
parent 5ac66b0f95
commit eda2fd8dbe
16 changed files with 448 additions and 268 deletions

View File

@@ -180,13 +180,9 @@ void GcodeSuite::get_destination_from_command() {
#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
}
cutter.inline_power(cutter.power_to_range(cutter_power_t(round(parser.value_float()))));
else if (ENABLED(LASER_MOVE_G0_OFF) && parser.codenum == 0) // G0
cutter.set_inline_enabled(false);
#endif
}