Laser updates followup (#18237)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Luu Lac
2020-06-08 19:53:39 -05:00
committed by GitHub
parent 2f28e8ba13
commit 0fa345f98f
3 changed files with 23 additions and 16 deletions

View File

@ -1826,6 +1826,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
// Update block laser power
#if ENABLED(LASER_POWER_INLINE)
laser_inline.status.isPlanned = true;
block->laser.status = laser_inline.status;
block->laser.power = laser_inline.power;
#endif

View File

@ -355,7 +355,7 @@ class Stepper {
#if ENABLED(LASER_POWER_INLINE_TRAPEZOID)
typedef struct {
bool trap_en; // Trapezoid needed flag (i.e., laser on, planner in control)
bool enabled; // Trapezoid needed flag (i.e., laser on, planner in control)
uint8_t cur_power; // Current laser power
bool cruise_set; // Power set up for cruising?
@ -367,7 +367,7 @@ class Stepper {
#endif
} stepper_laser_t;
static stepper_laser_t laser;
static stepper_laser_t laser_trap;
#endif